Question
Should HAL_RTC_Init be preceded by HAL_PWR_EnableBkUpAccess
CubeMX generated code to enable RTC Wakeup starts with HAL_RTC_Init but the examples in the HAL library 'unlock' the RTC via the PWR module using HAL_PWR_EnableBkUpAccess.
Which is correct? CubeMX or Example code in HAL?