Skip to main content
tux
Associate
June 11, 2015
Question

STM32F103 RTC SubSecond alarm

  • June 11, 2015
  • 3 replies
  • 1326 views
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
This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
June 11, 2015
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
tux
tuxAuthor
Associate
June 11, 2015
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

Tesla DeLorean
Guru
June 11, 2015
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..