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 enabling 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_EnableBkUpAccess() is referenced by 36 libraries and example projects: