cancel
Showing results for 
Search instead for 
Did you mean: 

RTC alarm versus clock Counter

bruzzim
Associate II
Posted on March 10, 2010 at 17:52

RTC alarm versus clock Counter

6 REPLIES 6
swhite2
Associate III
Posted on May 17, 2011 at 13:42

When you update any RTC register you MUST wait for the operation to complete.

If you're using ST's standard peripheral library you accomplish this by a call to

RTC_WaitForLastTask();

(See the attached image)

I suspect you're not doing this and one or more writes are being missed.

damh
Associate II
Posted on May 17, 2011 at 13:42

If you only use stopmode, you can use the RTC_SECOND for frequent interrupts and then you doesn't have to update RTC at all.

If you use standbymode, too, you are forced in this cases to use RTC_ALARM!

bruzzim
Associate II
Posted on May 17, 2011 at 13:42

I use stop-mode and I'd really like to use RTC_SECOND but it simply doesn't work: once in stop-mode rtc second interrupts dont't awake the cpu. In fact reading the reference manual (pag. 61 table 11):

(about exiting from stop mode)

<<.. If WFI was used for entry: Any EXTI Line configured in Interrupt Mode( the corresponding EXTI Interrupt vector must be enavlled in the NVIC)>>

I understand that I need to configutre EXTI as Interrupt Event but as far as I know just ALARM has its own EXTI line (line 15) then SECOND INTERRUPT cannot awake from STOP.

Am I right?

ongth602
Associate
Posted on May 17, 2011 at 13:42

Hi,

You can't use RTC second interrupt in stop mode. Pls refer to application note AN2629.

BR,

Ong

filippo2991
Associate II
Posted on May 17, 2011 at 13:42

You would switch to  stm32f low power line as soon as they will be available. I heard that it can be awoke by lse interrupts. 

BR

Kaouther BELHADJ
ST Employee
Posted on May 17, 2011 at 13:42

Only RTC Alarm Event mapped on EXTI Line 17 can wake up the system from Stop mode.  All details for stop mode enrty/ exit are available in RM0008 and you can find some examples in AN2629. teik_hong.ongFriday, May 14, 2010 8:40 AMRTC alarm versus clock Counter

Hi,

You can't use RTC second interrupt in stop mode. Pls refer to application note AN2629.

BR,

Ong