Skip to main content
arnold_w
Senior II
March 11, 2019
Question

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

  • March 11, 2019
  • 3 replies
  • 668 views

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?

This topic has been closed for replies.

3 replies

Uwe Bonnes
Chief
March 11, 2019

Have a look at the RCC control/status register.

Piranha
Principal III
March 11, 2019

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

arnold_w
arnold_wAuthor
Senior II
March 12, 2019

Thank you.