Skip to main content
Eetu Nevalainen
Associate II
June 26, 2017
Solved

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

  • June 26, 2017
  • 1 reply
  • 960 views
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
This topic has been closed for replies.
Best answer by Eetu Nevalainen
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.'

1 reply

Eetu Nevalainen
Eetu NevalainenAuthorBest answer
Associate II
June 28, 2017
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.'