2010-10-27 06:27 AM
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''?
2010-10-27 08:38 AM
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.