Skip to main content
Barbie
Associate III
September 23, 2014
Question

PWR_ClearFlag(PWR_FLAG_SB) not work

  • September 23, 2014
  • 1 reply
  • 843 views
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
This topic has been closed for replies.

1 reply

Amel NASRI
ST Technical Moderator
September 23, 2014
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 "Best Answer" on the reply which solved your issue or answered your question.