The relevant registers (prescaled value, counter value and alarm clock value) of RTC can be accessed through APB1 interface. APB1 interface: used to connect with APB1 bus.overflow interrupt, indicating that the internal programmable counter overflows and returns to 0. second interrupt, used to generate a programmable periodic interrupt signal (up to 1 second). alarm clock interrupt, which is used to generate a software programmable alarm clock interrupt. RTC core (prescaler, alarm clock, counter and divider) can only be reset by the backup domain (see section 6.1.3 for details). LSI oscillator clock (see RTC clock in section 6.2.8 for details). the following three RTC clock sources can be selected:.two separate clocks: PCLK1 and RTC clocks for APB1 interface (the frequency of RTC clock must be less than that of PCLK1 clock).32-bit programmable counter, which can be used for measurement in a long period of time. Programmable pre frequency division coefficient: the maximum frequency division coefficient is 220.set register PWR_ The DBP bit of Cr enables access to backup register and RTC.set register RCC_ PWREN and BKPEN bits of apb1enr enable the power supply and backup interface clock.The following operations will enable access to the backup register and RTC: After the system is reset, access to the backup register and RTC is prohibited to prevent accidental write operations to the backup area (BKP).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |