5.2.8 RTC/AWU clock
เมื่อ the RTCCLK clock source ถูกเลือกแล้ว, วิธีเดียวที่เป็นไปได้ในการแก้ไขการเลือกคือการรีเซ็ต the power domain
The RTCCLK clock source สามารถเป็นอย่างใดอย่างหนึ่ง the HSE 1 MHz (HSE ที่หารโดย a programmable prescaler), the LSE หรือ the LSI clock. นี้ถูกเลือกโดยการโปรแกรม the RTCSEL[1:0] bits ใน the RCC backup domain control register (RCC_BDCR) และ the RTCPRE[4:0] bits ใน RCC clock configuration register (RCC_CFGR). การเลือกนี้ไม่สามารถถูกแก้ไขโดยปราศจากการรีเซ็ต the Backup domain.
ถ้า the LSE ถูกเลือกเป็น the RTC clock, the RTC จะทำงานตามปกติถ้า the backup หรือ the system supply หายไป. ถ้า the LSI ถูกเลือกเป็น the AWU clock, the AWU state จะไม่ถูกรับประกันถ้า the system supply หายไป. ถ้า the HSE oscillator ที่หารโดย a value ระหว่าง 2 และ 31 ถูกใช้เป็น the RTC clock, the RTC state จะไม่ถูกรับประกันถ้า the backup หรือ the system supply หายไป.
The LSE clock อยู่ใน the Backup domain, ในขณะที่ the HSE and LSI clocks ไม่อยู่. ผลที่ตามมา:
• ถ้า LSE ถูกเลือกเป็น the RTC clock:
– The RTC จะทำงานต่อไปถึงแม้ว่า the VDD supply ถูกปิด, โดยจัดให้มี the VBAT supply ถูกรักษาไว้.
– The RTC ยังคงให้สัญญานนาฬิกาและทำหน้าที่ภายใต้ system reset.
• ถ้า LSI ถูกเลือกเป็น the Auto-wakeup unit (AWU) clock:
– The AWU state จะไม่ถูกรับประกันถ้า the VDD supply ถูกปิด. ดูที่ Section 5.2.5: LSI clock บนหน้า 139 สำหรับราย
ละเอียดที่มากขึ้นเกี่ยวกับ LSI calibration.
• ถ้า the HSE clock ถูกใช้เป็น the RTC clock:
– The RTC state จะไม่ถูกรับประกันถ้า the VDD supply ถูกปิดหรือถ้า the internal voltage regulator ถูกปิด (เอา power
ออกจาก the 1.2 V domain) และเมื่อเข้าสู่ใน Stop mode ด้วย
Note: เพื่ออ่าน the RTC calendar register เมื่อ the APB1 clock frequency น้อยกว่าเจ็ดเท่าของ the RTC clock frequency (fAPB1 < 7xfRTCLCK), the software ต้องอ่าน the calendar time and date registers สองครั้ง. The data ถูกต้องถ้า the second read เข้าถึงไปยัง RTC_TR ให้ผลลัพธ์เหมือนกันกับค่าอ่านแรก. ถ้าเป็นอย่างอืน a third read access ต้องถูกดำเนินการ.