If the HSE divided by 2, 3, ..31 is used as the RTC clock, the Backup Domain Access should be kept enabled. The following sequence is required to bypass the delay between DBP bit programming and the effective disabling of the backup domain. Please check the Errata Sheet for more details under "Possible delay in backup domain protection disabling/enabling after programming the DBP bit" section.
Examples
HAL_PWR_DisableBkUpAccess() is referenced by 10 libraries and example projects: