AnsweredAssumed Answered

STM32L053R8 Reset identification register can't be cleared

Question asked by quinz.daniel on Sep 25, 2014
Latest reply on Oct 8, 2014 by quinz.daniel
Hi all,

After reading the RCC_CSR register to determine the reset source, I want to clear the register so as to be able to resolve future non-por resets.  When I follow the instructions in the datasheet, the bits do not clear.

Here is the code sequence that I use:
RCC->CSR |=  (1U << 24) ; // RMVF : Clear reset flagsRCC->CSR &= ~(1U << 24) ; 

The data sheet is not clear on exactly how to use this bit.  It says to set the bit, but does not specify if the bit will reset automatically or if it needs to be explicitly cleared afterward.

I have tried both cases and still, the flags do not reset.

Also, I am able to determine POR and SOFWARE reset, but when I drive the external reset pin, the PIN reset flag is not set.

Has anyone else had this problem?

I have looked at the errata for this device and the only thing related is a need for a work-around delay when enable the RCC clock.

I suspect I am missing something and that somehow these bits a write-protected.

Any hints, solutions, etc. would greatly by appreciated.