Skip to main content
Visitor II
May 20, 2025
Question

STM32WLE: what is RTC mixed mode good for?

  • May 20, 2025
  • 1 reply
  • 293 views

Setting RTC binary mixed mode on STM32WLE leads to normal operation of BCD Alarm and wake-up counter plus their wakeup and IRQ triggering-so far so good. It behaves similar when set to binary mode only - binary alarm etc work as expected. So what is the difference between RTC's BCD mode and mixed mode? In mixed mode I would expect, that both binary and BCD (calendar) alarms work in parallel, but I do not get the binary alarm IRQ. IMHO there is no apparent difference between RTC calendar and binary mixed modes. Any explanations/thoughts on this somebody?

1 reply

STTwo-32
Technical Moderator
May 29, 2025

Hello @PBE 

By default, the RTC is in BCD mode (BIN = 00 in the RTC_ICSR register): the RTC_SSR register contains the sub-second field SS[15:0], clocked by ck_apre, allowing the generation of a 1 Hz clock to update the calendar registers in BCD format (RTC_TR and RTC_DR). When the RTC is configured in mixed mode (BIN = 10 or 11 in the RTC_ICSR register): the RTC_SSR register contains the binary counter SS[31:0], clocked by ck_apre. The calendar is updated (1 second increment) each time the SSR[BCDU+7:0] reaches 0.

More details are available on the chapter RTC of the RM0461.

Best Regards.

STTwo-32