Unable to flash blank or misprogrammed chips on STM32L #112

Closed
50m30n3 opened this Issue Oct 27, 2012 · 1 comment

Comments

Projects
None yet
2 participants

50m30n3 commented Oct 27, 2012

Commit bfc368c breaks flashing of blank or misprogrammed chips on the STM32L Discovery board.

The program aborts with the following output:

2012-10-27T19:57:55 INFO src/stlink-common.c: Loading device parameters....
2012-10-27T19:57:55 INFO src/stlink-common.c: Device connected is: L1 Med-density device, id 0x10186416
2012-10-27T19:57:55 INFO src/stlink-common.c: SRAM size: 0x4000 bytes (16 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 256 bytes
2012-10-27T19:57:55 INFO src/stlink-common.c: Attempting to write 3000 (0xbb8) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08000b00 erased
2012-10-27T19:57:55 INFO src/stlink-common.c: Finished erasing 12 pages of 256 (0x100) bytes
2012-10-27T19:57:55 INFO src/stlink-common.c: Starting Half page flash write for STM32L core id
2012-10-27T19:57:55 INFO src/stlink-common.c: Successfully loaded flash loader in sram
2012-10-27T19:57:55 FATAL src/stlink-common.c: flash loader run error

In previous versions this would only result in a warning.

@6thimage 6thimage added a commit to 6thimage/stlink that referenced this issue Mar 22, 2013

@6thimage 6thimage Limited DMA clearing to STM32F4, removed fatal error for flash loading.
Commit 0ed399 added the clearing of DMA registers that was preventing
programming (see issue #74), however it uses hardcoded addresses of the
DMA registers on the STM32F4. This seems to prevent the flashing and
verification on STM32L1, as the registers only partly cover the range
zeroed. So the DMA clearing has been limited to the STM32F4
microcontroller.

Additionally, sometimes, typically directly after erases, a 'flash
loader run error' will occur that terminates the writing. This is not
necessary, as the writing is successfully performed by page writing
(line 1581 onwards of stlink-common.c), and so has been returned to a
error message (see issue #112). There is a comment on line 1574 (added by
Uwe Bonnes in commit 0164043) that this may happen on blank devices,
and so the fatal error message is the incorrect response.
9d5710b

@6thimage 6thimage added a commit to 6thimage/stlink that referenced this issue Mar 22, 2013

@6thimage 6thimage Limited DMA clearing to STM32F4, removed fatal error for flash loading.
Commit 0ed3907 added the clearing of DMA registers that was preventing
programming (see issue #74), however it uses hardcoded addresses of the
DMA registers on the STM32F4. This seems to prevent the flashing and
verification on STM32L1, as the registers only partly cover the range
zeroed. So the DMA clearing has been limited to the STM32F4
microcontroller.

Additionally, sometimes, typically directly after erases, a 'flash
loader run error' will occur that terminates the writing. This is not
necessary, as the writing is successfully performed by page writing
(line 1581 onwards of stlink-common.c), and so has been returned to a
error message (see issue #112). There is a comment on line 1574 (added by
Uwe Bonnes in commit 0164043) that this may happen on blank devices,
and so the fatal error message is the incorrect response.
0b2c105
Collaborator

xor-gate commented May 3, 2016 edited

Should be fixed by now with the merge of #138

xor-gate closed this May 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment