Configure RTC Binary and Mix modes
mainSome STM32 RTCs (like stm32wl55) support different functional modes.
MODE_BCD: Standard BCD mode for calendar.MODE_MIX: Combines BCD with a 32-bit free-running binary counter.MODE_BIN: Uses only the binary counter (time and date registers are not used).
Subsecond behavior by mode:
- In
MIXorBCDmode, subseconds are expressed in milliseconds [0..999]. - In
BINmode, subseconds are expressed as [0..0xFFFFFFFF]. In this mode,getEpochonly returns the subsecond value (thetime_treturned is invalid).
rtc.setBinaryMode(STM32RTC::MODE_MIX);
Binary_Mode currentMode = rtc.getBinaryMode();