/* RTC MSP Initialization This function configures the hardware resources used in this example.  */
void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc)
/* RTC MSP Initialization This function configures the hardware resources used in this example.  */
void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc)
{
  RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
  if(hrtc->Instance==RTC)
  {
    if (IS_ENGINEERING_BOOT_MODE())
    {
        PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
        PeriphClkInit.PeriphClockSelection  = RCC_PERIPHCLK_RTC;
        if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
        {
            Error_Handler();
        }
    }
    __HAL_RCC_RTC_ENABLE();
  }
}