cancel
Showing results for 
Search instead for 
Did you mean: 

I can't clear RCC flag (RCC_ClearFlag in stm32f103)

TPham.10
Associate II

Hi guys!

I have a problem with stm32f103, I want to check MCU Reset cause, I use RCC_GetFlagStatus is ok, after that i'll clear rcc flag but It's not working & MCU not working when user RCC_ClearFlag. If i remove RCC_ClearFlag function then MCU work normal but RCC Register Reset don't clear so i don't know cause MCU reset.

I try RCC -> CSR |=0x01000000 set RMVF to clear flag but it also not working

Can you help me, thank a lot!

1 REPLY 1
TPham.10
Associate II

I debug then see clear reset flag success but after that MCU not working if reset again or on/off power. remove funtion RCC_ClearFlag and program again turn off all power and turn on again mcu will working.