2009-10-17 03:27 PM
Reset behavior
2011-05-17 04:27 AM
I noticed that depending on how I reset, I get different behavior. If I reset in SW via the Cortex Application Interrupt And Reset Control Register, all registers are reset correctly. The RCC_CSR register shows the cause as a Software Reset (SFTRSTF) and a Pin reset (PINRSTF). If I either ''Download and Debug'' from the project menu or once in the debugger, ''Restart Debugger'', all registers are reset correctly and the RCC_CSR register shows that I received a Pin Reset. However, if I reset via the Debug->Reset menu option, the program counter resets, but the registers do not and the RCC_CSR register does not show any cause. Why is this?
Also, is there any way to define which peripherals are reset on a power up? Thanks much, Dan2011-05-17 04:27 AM
You need to state what tools you're using!
You should (also) be asking the tool provider.2011-05-17 04:27 AM
Oops. I'm using the IAR IDE with an STM32F10ZE.
2011-05-17 04:27 AM
Thanks. I had actually tried changing the type of reset. I'm just not clear where this reset type applies; flashing a new image vs the Debug->Reset menu. From my testing, it appeared to only apply when flashing a new image, but not through Debug->Reset. Interestingly, I noticed that upon loading an image with ''Core and Peripherals'' selected, my registers are cleared. However, when I select ''Normal'', the registers do not get cleared upon loading. I understand that Normal mode attempts to reset both the Core and Peripherals and if it fails, then resets only the Core. So it seems that reseting the peripherals is failing. Is there someway that I can verify this? And if so, why could this be? Also, does the reset behavior specified in the JLink setup apply to the Debug->Reset menu and if not, can I set it?
Thanks much! Dan2011-05-17 04:27 AM
Hi,
There are different resets in Cortex-M3 : For more details refer to our PM0056 : { Page 119 : 4.3.4 Application interrupt and reset control register (SCB_AIRCR)} In IAR/EWARM, you can select your Reset using this option ( See attached Picture) Cheers, STOne-32/