STM32 gotchas
277. RTC_ISR.INIT is not quite write protected by PWR_CR.DBP

The following behaviour has been observed on an STM32F427, and is not confirmed by ST.

Setting the RTC_ISR.INIT bit is equivalent to "pulling the crown" on mechanical watches: it stops advancing of the time/date, and allows to write into RTC_TR and RTC_DR. According to description in RM, this bit is protected by the "two locks" protection applying to most RTC registers.

However, experimentation revealed, that while the RTC_WPR protection indeed prevents writing RTC_ISR.INIT, the PWR_CR.DBP lock not quite so. Turns out, that this bit can indeed be written even with PWR_CR.DBP protection locked, except that its effect (stopping clock, enabling time/date write) is not applied until the protection is PWR_CR.DBP removed.

While not a gaping error, in some cases, where spurious writes can occur and the software relies upon the PWR_CR.DBP protection, this may lead to unexpected problems, especially if the RTC_WPR protection is not applied meticulously.