cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WLE: what is RTC mixed mode good for?

PBE
Associate

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 1
STTwo-32
ST Employee

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.