cancel
Showing results for 
Search instead for 
Did you mean: 

PWR_ClearFlag(PWR_FLAG_SB) not work

Barbie
Associate II
Posted on September 23, 2014 at 13:15

Hi.

I am using the STM32F205ZC and I try to clear the StandBy flag by this command.PWR_ClearFlag(PWR_FLAG_SB). But it doesn't work. I try manual to go to PWR_CR->CSBF and clear there but no help.

Only when I active before RCC_ClearFlag(); It work.

I allow access to the PWR by this command

  PWR_BackupAccessCmd(ENABLE);

Why it doesn't work by its own?

Thanks

Bar.

#standby-flag-stm32f205zc
1 REPLY 1
Amel NASRI
ST Employee
Posted on September 23, 2014 at 15:53

Hello,

Could you please provide the whole code sequence you are using? You have to enable the PWR clock first. ''PWR_BackupAccessCmd'' allows you to access the BKP domain & not PWR registers. You should use:

RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 
/* Clear StandBy flag */
PWR_ClearFlag(PWR_FLAG_SB); 
PWR_EnterSTANDBYMode();

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.