AnsweredAssumed Answered

Software Reset on STM32F417 - Doesn't Work?

Question asked by schell.kevin on Oct 21, 2013
Latest reply on Oct 22, 2013 by Clive One
Hi All,

I am working with the STM32F417. I am developing a bootloader and I need to generate a software reset. According to the Cortex-M4 programming manual (PM0214), you can generate a software reset by writing to the AIRCR register in the System Control Block. It appears that the only bit available to for a reset is bit 2, SYSRESETREQ. Bits 1 and 0 are reserved.

So, including the VECTKEY, I have the following line of code:

SCB->AIRCR = 0x05FA0004;

It does not do anything. It definitely does not reset the microcontroller. I have tried with and without connection to the debugger. No difference.

I cannot find any entries on the forum about software resets on the Cortex-M4. Apparently the Cortex-M3 libraries have routines called NVIC_SoftwareReset, and/or NVIC_GenerateSoftwareReset. My libraries do not include these functions.

I can confirm that bit 0 of the CONTROL register is 0, indicating that I am in privileged mode so I am allowed to write to the AIRCR register.

Are there any steps/actions need to take right before, or right after the write to AIRCR?

There is nothing in the errata about this software feature.

Thanks

Kevin

Outcomes