cancel
Showing results for 
Search instead for 
Did you mean: 

Can the STM32F7 decide whether last boot option was power on or software reset?

arnold_w
Senior

I want to do different things in my STM32F7-microcontroller depending on whether someone turned on power (meaning ALL components on the PCB recently started up) or the micrcontroller was reset through a software reset (meaning ONLY the STM32F7-microcontroller on the PCB is starting up). It is possible to distinguish between the cases from within the source code?

3 REPLIES 3
Uwe Bonnes
Principal III

Have a look at the RCC control/status register.

Piranha
Chief II

Yes, that's possible by checking and clearing (!!!) respective bits in RCC_CSR register.

arnold_w
Senior

Thank you.