The RELOAD_FROM_BBD bit of the
RTC_SYNCPEND register behaves specially compared to the other registers in RTC. This
register bit has the following special properties:
- It can be written 1 when RTC is in the locked state or when RTC is in the
unlocked state. In other words, it can be written 1 regardless of the status of
the Functional Protection state machine.
- It can be written 1 only when all of the following bits are 0:
- RTC_SYNCPEND.RD_PEND
- RTC_SYNCPEND.WR_PEND
- All interrupt status bits from RTC_IRQSTATUS_RAW_SYS
In order to perform a successful RELOAD_FROM_BBD write, software should ensure that
these preconditions are met and then let the operation complete before further
accesses to RTC according to the following procedure.
- Check if any interrupts are set in RTC_IRQSTATUS_RAW_SYS.
- If any interrupt bits are set, use the steps from the previous Interrupt Service
Routine section in to clear all interrupt status bits.
- Poll the RTC_SYNCPEND register until RD_PEND and WR_PEND are both 0.
- Write 0x80000000 to RTC_SYNCPEND to trigger the RELOAD_FROM_BBD
functionality.
- The register field RTC_SYNCPEND.RD_PEND will be set to 1 after this write.
Further reads and writes must wait until RD_PEND is 0 as per other sections.