cancel
Showing results for 
Search instead for 
Did you mean: 

What's the proper way to clear RTC alarm output after an alarm?

Eetu Nevalainen
Associate II
Posted on June 26, 2017 at 15:39

Hi,

STM32F446 user here. I'm routing RTC alarm output to PC13 and after an alarm I need to clear the output pin back to low state. I recall myself reading something about clearing RTC alarm output in a specific way but I can't find the source anymore.

#rtc #pc13 #alarm
1 ACCEPTED SOLUTION

Accepted Solutions
Eetu Nevalainen
Associate II
Posted on June 28, 2017 at 14:06

Found the answer.

'When the calendar reaches the alarm A pre-programmed value in the RTC_ALRMAR register (TC_ALRMBR register for alarm B), the alarm flag ALRAF bit (ALRBF bit), in the RTC_ISR register, is set to ‘1’. If the alarm A or alarm B flag is routed to the RTC_ALARM output (RTC_CR_OSEL[1:0] =�01� for alarm A, and RTC_CR_OSEL[1:0] =�10� for alarm B), this pin is set to high level or to low level, depending on the polarity selected. The output toggles when the selected alarm flag is cleared.'

View solution in original post

1 REPLY 1
Eetu Nevalainen
Associate II
Posted on June 28, 2017 at 14:06

Found the answer.

'When the calendar reaches the alarm A pre-programmed value in the RTC_ALRMAR register (TC_ALRMBR register for alarm B), the alarm flag ALRAF bit (ALRBF bit), in the RTC_ISR register, is set to ‘1’. If the alarm A or alarm B flag is routed to the RTC_ALARM output (RTC_CR_OSEL[1:0] =�01� for alarm A, and RTC_CR_OSEL[1:0] =�10� for alarm B), this pin is set to high level or to low level, depending on the polarity selected. The output toggles when the selected alarm flag is cleared.'