cancel
Showing results for 
Search instead for 
Did you mean: 

Debug reset does not reset registers

kenn
Associate II
Posted on October 27, 2010 at 15:27

When using IAR Embedded Workbench with the STM32 Discovery, resetting the microcontroller with the interface does not reset the registers, nor memory.

This is unexpected, and caused me to lose a lot of time. Is this an IAR bug, an STLink one, or a ''feature''?

1 REPLY 1
Posted on October 27, 2010 at 17:38

Probably just IAR. The registers reset to defaults after a hard reset, try having the stick store the values when you press the button on the board. RAM is static, it always retains across a soft/hard reset. Cycling the power will result in undefined content in RAM. Typically part of you initialization will clear memory if it is important. Most C compiler clear at least some of the memory they use.

The reset on the STM32 (or ARM's in general) can fail if the pin is driven high, or otherwise interfered with externally.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..