cancel
Showing results for 
Search instead for 
Did you mean: 

Standby mode

jspika
Associate II
Posted on April 10, 2013 at 17:12

Hello.

Does anyone has any idea how can i get the source of wake up from standby mode? I use only RTC and wake up pin. I found a WUF bit in PWR_CSR, but problem is that this bit is for both events. Thanks for any idea
4 REPLIES 4
Posted on April 10, 2013 at 17:17

Doesn't the RTC signal the alarm condition? Can you observed the state of the GPIO pin?

If the external event is transient perhaps you need to latch it, and clear it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jspika
Associate II
Posted on April 10, 2013 at 20:34

I tryed to catch the RTC_FLAG_OW and RTC_FLAG_ALR.. In data sheet are these figures:

0690X00000602PlQAI.bmp

So i think flags should be still on after wake up,shouldnt they? In my code i use this:

if (RTC_GetFlagStatus(RTC_FLAG_ALR))

 

    LCD_DisplayStringLine(Line7, ''RTC_FLAG_ALR on'');

 

if (RTC_GetFlagStatus(RTC_FLAG_OW ))

 

    LCD_DisplayStringLine(Line8, ''RTC_FLAG_OW on'');

But it always shows that flags are set on 0.

Posted on April 10, 2013 at 22:12

  if (PWR_GetFlagStatus(PWR_FLAG_WU))

      puts(''PWR_FLAG_WU'');

  if (PWR_GetFlagStatus(PWR_FLAG_SB))

      puts(''PWR_FLAG_SB'');

    if (RTC_GetITStatus(RTC_IT_ALRB))

        puts(''RTC_IT_ALRB'');

    if (RTC_GetITStatus(RTC_IT_ALRA))

        puts(''RTC_IT_ALRA'');

00:14:00

Standby Option

....ENTERS STANDBY, Alarm set for 2 minutes hence

....EXITS

PWR_FLAG_WU

PWR_FLAG_SB

RTC_IT_ALRA

RTC from STANDBY....

00:16:00
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jspika
Associate II
Posted on April 15, 2013 at 00:23

Just for ppl who will work with this problem : there are two ideas how go.

1. check RTC counter ( after RTC alarm it should be somewhere on the start)

2. check status on WKUP GPIO. Butt isnt fast as uController,so there will be still information that butt is pressed

I tryed only 2. - and all worked ok,.