2017-08-05 01:53 AM
Hello every one
I am working with STM32F405 series .
It is essential for me to know that How many times reset has been occurrence.
I have EEPROM in my project board.so i can keep last status.
Which register should I monitor?
thank you .
#reset2017-08-05 04:54 AM
At the begining of main() read and increment a 32 bit eeprom quantity will do the job. Add an application way to clear the counter and make sure the value saturate. In stm32 there are registers in sys or rcc to know the reset causd, hot or cold reset, watchdog reset, etc... All reset will restart the code...
2017-08-05 05:01 AM
Hello!
At RCC_CSR iregister you can use the PORRSTF flag to see if you start after a POR reset or not.
you can use the PINRSTF to see if the reset is from RST pin
or you can use SFTRSTF to find if asoft reset has occured
2017-08-05 05:16 AM
RAM is not cleared across reset, but is invalidated via a power cycle. BKPRAM is also typically available
Add critical code into the Reset_Handler. The STM32 also have a reset reason register.
You could walk across a Flash page writing an erased word to mark a use cycle, using multiple pages you could record an extremely large use count.