cancel
Showing results for 
Search instead for 
Did you mean: 

Wakeup from Standby doesn't work on toggle

Barbie
Associate II
Posted on November 03, 2014 at 10:14

I work with the Wakeup pin (PA0) as STandBy wakeup.

When I set PA0=''0'' change it to WakeUP pin  and then enter StandBy. When I make PA0=''1'' it get out of the Standby state and work as usuall.

But when I enter to StandBy after confige it and PA0=''1'' and then try to toggle PA0 ->0->1 it doesn't work.

I do all the glage clear before enter Standby.

Here is the code for entering Standby:

    PWR_WakeUpPinCmd(ENABLE); //Enables the WakeUp Pin functionality 

        /* Clear Wakeup flag  */

    PWR->CR |= PWR_CR_CWUF;

    /* Clear all RTC flages that can mask the WUF function */

    RTC_ClearFlag(RTC_FLAG_ALRBF | RTC_FLAG_ALRAF | RTC_FLAG_TSF | RTC_FLAG_WUTF| RTC_FLAG_TAMP1F  );

    /* Request to enter STANDBY mode  */

    PWR_EnterSTANDBYMode();  // enter to StandBy mode   

As I read it the Wakeup work on rise enge and not level.

DO I miss soemthing?

Bar.

#wakeup-pin-standby-stm32f205
5 REPLIES 5
Posted on November 03, 2014 at 10:27

Read the manual.

RM0033, ''Exiting Standby mode'':

''The microcontroller exits Standby mode [...] a rising edge on WKUP pin [...]''

JW
Barbie
Associate II
Posted on November 03, 2014 at 12:41

I know it.

I do 1->0->1 so it should work on the second step. But it didn't. Is there a problem be on ''1'' when I enable that pin as wakeup?

Barbie
Associate II
Posted on November 04, 2014 at 08:51

I look on that thread.

I do as ST propose to get over the PA0=''1'' when go to Standby.

1. Make WakeUp function, disable.

2. Clear the Wakeup flag.

3. Clear all RTC flages also.

3. Enable Wakeup function.

4. Enter StandBy.

Don't get out of StandBy when go 1->0->1.

Any idea?

Bar.

Posted on November 04, 2014 at 09:19

Can you please post a minimal but complete compilable code which exhibits the problem?

JW