cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B0RET - SFTRSTF not working?

Nadreoh
Associate II

Hi there,

Context

I implement a basic code where I check the reset cause flag SFTRSTF (i.e. software reset). If this flag is active, I activate the LED on (LED off otherwise).

I read out the reset cause from:

uint32_t myResetCause = RCC->CSR;
RCC->CSR |= RCC_CSR_RMVF; // Clean reset causes for next start

 Issue

After flashing this code, I power off my MCU and I remove the debugger cable.
Then I power on my MCU and it activates the LED, meaning the software reset has been detected, but I triggered an hardware reset ...!

Do I miss to clean another register?
Is there any information somewhere about this behavior?
Is it an expected behavior??

1 REPLY 1
Nadreoh
Associate II

Ok my issue is related to a RAM area that I configured to be ignored by the BSS and that took random values at boot.