cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to program when in stop mode

bluscape
Associate III
Posted on March 22, 2016 at 18:41

I'm unable to program a STM32 using the STLink2 when the micro has firmware running that puts it into stop mode.

I've played with the reset sequence settings in Keil but none of them solve my problem.

Does anyone know how to reprogram a STM32 micro with the STLInk2 and Keil when its in stop mode.

I just completed a low power project using the STM32F040 and had the same issue. I'm unable to program the micro when its in stop mode. Once would thing the reset sequence will allow the STLink2 to program it? Luckily I had an interrupt that woke up the micro and would delay for a couple seconds before it stopped again.

On my new board using the L151 I do not have this implemented. The micro is now programmed with firmware that puts it into stop mode and I'm unable to reprogram the micro again.
3 REPLIES 3
Posted on March 22, 2016 at 19:16

There should be a ''Connect Under Reset'' type option.

Or you could strap BOOT(0) High so it enters the System Loader rather than your own code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bluscape
Associate III
Posted on March 23, 2016 at 18:22

Thanks for that insight.

bluscape
Associate III
Posted on March 23, 2016 at 22:09

That worked when the system loader was enabled. When I booted from flash again I was still unable to program the flash. I then realized the PLLDIV was to low and the system clock was too high. Preventing me from programming the micro.