cancel
Showing results for 
Search instead for 
Did you mean: 

User application crashes 20 seconds after DFU bootloader jumps to it

logan
Associate II
Posted on September 14, 2014 at 02:28

I have a USB bootloader at address 0x08000000 that allows my STM32 to be programmed using dfu-util. I will eventually have my main firmware stored at 0x0800c000 and the bootloader will perform a ''jump'' to 0x0800c000 assuming everything looks okay. Otherwise it will go into USB DFU mode.

For now, I have a simple ''blinky'' app at location 0x0800c000. The app just blinks the 4 STM32F4-Discovery LEDs in a circular fashion, then blinks all of them twice and repeats.

After programming this binary at 0x0800c000 with dfu-util and resetting, the bootloader correctly jumps to 0x0800c000 and the lights are blinking. However, after 20 seconds, it stops with one led blinking very fast (it seems like it is frozen). After 10 seconds in this state, it seems the chip resets. Upon reset, my bootloader attempts to dereference 0x0800c000 (it expects to see the _estack entry there), but instead gets 0xffffffff. So it seems my blinky app is gone, or corrupted. How is this possible? Can anyone explain what could be happening?
1 REPLY 1
logan
Associate II
Posted on September 14, 2014 at 05:34

I'm embarrassed to say I've figured this out. It was as simple as me not resetting the IWDG timer. Good to know the watchdog works 😉