2025-05-20 10:45 AM
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?
2025-05-29 3:20 AM - edited 2025-05-29 3:20 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.