2016-03-22 10:41 AM
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.2016-03-22 11:16 AM
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.2016-03-23 10:22 AM
Thanks for that insight.
2016-03-23 02:09 PM
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.