cancel
Showing results for 
Search instead for 
Did you mean: 

Reset behavior

daneichenwald2
Associate II
Posted on October 18, 2009 at 00:27

Reset behavior

5 REPLIES 5
daneichenwald2
Associate II
Posted on May 17, 2011 at 13:27

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,

Dan

st3
Associate II
Posted on May 17, 2011 at 13:27

You need to state what tools you're using!

You should (also) be asking the tool provider.

daneichenwald2
Associate II
Posted on May 17, 2011 at 13:27

Oops. I'm using the IAR IDE with an STM32F10ZE.

daneichenwald2
Associate II
Posted on May 17, 2011 at 13:27

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!

Dan

16-32micros
Associate III
Posted on May 17, 2011 at 13:27

Hi,

There are different resets in Cortex-M3 : For more details refer to our PM0056 :

http://www.st.com/stonline/products/literature/pm/15491.pdf

{ 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/