RTC also has an alarm clock register RTC_ALR, which is used to generate an alarm clock. The second module is A 32-bit programmable counter RTC_CNT),Can be initialized to the current system time, a 32-bit clock counter, calculated in seconds, can be recorded Record 4294967296 seconds, which is about 136 yearsAs a general application, this is sufficient. If the corresponding enable bit is set in the RTC_CR register, RTC will generate an interrupt (second interrupt) in each TR_CLK cycle. The RTC prescaler module includes a 20-bit programmable divider (RTC prescaler). The first module is the RTC prescaler module, which can be programmed to generate 1 second RTC time reference TR_CLK. The other part (RTC core) consists of a group of Programming counterComposition, divided into two main modules. The APB1 interface is driven by the APB1 bus clock and is used to connect to the APB1 bus. This unit also contains a set of 16-bit registers, which can be read and written via the APB1 bus. The first part (APB1 interface) is used to APB1 busConnected. RTC consists of two main parts (see the figure above). and so Before setting the time, first cancel the backup area (BKP) write protection However, after the system is reset, access to the backup register and RTC is automatically prohibited to prevent accidental write operations to the backup area (BKP). The RTC module and clock configuration system (RCC_BDCR register) are in the backup area, that is, the RTC setting and time remain unchanged after the system is reset or wakes up from standby mode. Modifying the counter value can reset the current time and date of the system. Under the corresponding software configuration, it can provide Clock calendarFeatures. The RTC module of STM32 has a set of continuous counting counters. The STM32 real-time clock (RTC) is a Independent timer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |