Inconsistent runtime on st-flash #70

Closed
rogerdahl opened this Issue Mar 15, 2012 · 1 comment

Comments

Projects
None yet
3 participants
@rogerdahl

Below is the output from running st-flash two times with a 10 second wait between the first and the second run, and nothing having changed. The first run gave errors, wrote full pages, ran in a little over 4 minutes and ended with stating that the flashing was verified and successful (I didn't check). The second run gave no errors, flashed half pages, ran in 1 minute and also ended with a successful verification of the flashed data.

I'm wondering...

  • What is the l1_run_flash_loader error I got on the first run?
  • Why did the first run decide to flash full pages, and the second to flash half pages?
  • Why is flashing full pages 4 times as slow as flashing half pages?

Thank you,

Roger

dahl@ubuntu:/Desktop/7$ st-flash write test 0x8000000
2012-03-13T21:23:29 INFO src/stlink-common.c: Loading device parameters....
2012-03-13T21:23:29 INFO src/stlink-common.c: Device connected is: L1 Med-density device, id 0x10386416
2012-03-13T21:23:29 INFO src/stlink-common.c: SRAM size: 0x4000 bytes (16 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 256 bytes
2012-03-13T21:23:29 INFO src/stlink-common.c: Attempting to write 122880 (0x1e000) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x0801df00 erased
2012-03-13T21:23:50 INFO src/stlink-common.c: Finished erasing 480 pages of 256 (0x100) bytes
2012-03-13T21:23:50 INFO src/stlink-common.c: Starting Half page flash write for STM32L core id
2012-03-13T21:23:50 INFO src/stlink-common.c: Successfully loaded flash loader in sram
run error
2012-03-13T21:23:54 WARN src/stlink-common.c: l1_run_flash_loader(0x8000000) failed! == -1
2012-03-13T21:23:54 WARN src/stlink-common.c:
write_half_pages failed == -1
479/480 pages written
2012-03-13T21:28:01 INFO src/stlink-common.c: Starting verification of write complete
2012-03-13T21:28:04 INFO src/stlink-common.c: Flash written and verified! jolly good!
dahl@ubuntu:
/Desktop/7$ st-flash write test 0x8000000
2012-03-13T21:28:13 INFO src/stlink-common.c: Loading device parameters....
2012-03-13T21:28:13 INFO src/stlink-common.c: Device connected is: L1 Med-density device, id 0x10386416
2012-03-13T21:28:13 INFO src/stlink-common.c: SRAM size: 0x4000 bytes (16 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 256 bytes
2012-03-13T21:28:13 INFO src/stlink-common.c: Attempting to write 122880 (0x1e000) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x0801df00 erased
2012-03-13T21:28:34 INFO src/stlink-common.c: Finished erasing 480 pages of 256 (0x100) bytes
2012-03-13T21:28:34 INFO src/stlink-common.c: Starting Half page flash write for STM32L core id
2012-03-13T21:28:34 INFO src/stlink-common.c: Successfully loaded flash loader in sram
959/960 halfpages written
2012-03-13T21:29:10 INFO src/stlink-common.c: Starting verification of write complete
2012-03-13T21:29:14 INFO src/stlink-common.c: Flash written and verified! jolly good!

@UweBonnes

This comment has been minimized.

Show comment Hide comment
@UweBonnes

UweBonnes Mar 15, 2012

Contributor

Did you run the fit version? I checked in
commit 0164043
Author: Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de
Date: Thu Jan 19 15:45:51 2012 +0100

A blank STM32L151 refused half-page writing. Fall back to half-word writing in
that case. Report advance in half-word writing. Setting stack and PC give
access error so automatic start fails too and hardware needs to be hard-reset
to start

Your issue seems you hit above problem with an outdated version.

Contributor

UweBonnes commented Mar 15, 2012

Did you run the fit version? I checked in
commit 0164043
Author: Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de
Date: Thu Jan 19 15:45:51 2012 +0100

A blank STM32L151 refused half-page writing. Fall back to half-word writing in
that case. Report advance in half-word writing. Setting stack and PC give
access error so automatic start fails too and hardware needs to be hard-reset
to start

Your issue seems you hit above problem with an outdated version.

@xor-gate xor-gate closed this May 4, 2016

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