Some key RTC registers
In this section, we will explore the characteristics and functions of some of the important registers within the RTC module. These registers are the building blocks that allow us to configure, control, and utilize the RTC’s features effectively. Let’s start with the RTC Time Register (RTC_TR
).
RTC Time Register (RTC_TR)
The RTC_TR
register is responsible for keeping track of the current time. It maintains the hours, minutes, and seconds in BCD format, ensuring that time is easily readable and manipulable. Here are some of the key fields in this register:
- Hour tens (HT) and hour units (HU): These bits represent the tens and units of the hour, respectively. They can handle both 24-hour and 12-hour formats.
- Minute tens (MNT) and minute units (MNU): These bits represent the tens and units of the minutes.
- Second tens (ST) and second units (SU): These bits represent the tens and units of the seconds.
- PM: This bit indicates the...