cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 RTC SubSecond alarm

tux
Associate II
Posted on June 11, 2015 at 16:41

Hi,

I want to set my RTC alarm sub second with the highest resolution for 1500ms. but there is not any helps, manuals, of sample codes expect ''AN3371 application note''.

could any one help me?

i realized there isn't function or code in

Standard Peripheral  Lib.

for sub second alarm. is it?

tanx

#rtc #stm32f103 #alarm #sub
3 REPLIES 3
Posted on June 11, 2015 at 17:06

1.5 seconds? Is this what you want for you resolution, or alarm interval?

You can change the granularity of the RTC, by changing the prescale divider and select/specify a clock for it.

I'm not sure there is a comparator on the subsecond (prescaled) portion of the counter.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
tux
Associate II
Posted on June 11, 2015 at 17:28

1.5s is the alarm interval, and i want it with the highest resolution. 

well, i selected ''LSE'' as clock source. i need it's alarm for wakeup use.

tanx for your reply

Posted on June 11, 2015 at 18:01

Then half the prescaler, and the 32-bit RTC counter will clock at 0.5s intervals, advance the alarm so it wakes every 3 ticks.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..