/* Waits until the RTC registers (RTC_CNT, RTC_ALR and RTC_PRL) are synchronized with RTC APB clock.  */
void RTC_WaitForSynchro(void)
/* Waits until the RTC registers (RTC_CNT, RTC_ALR and RTC_PRL) are synchronized with RTC APB clock.  */
void RTC_WaitForSynchro(void)
{
  RTC->CRL &= (uint16_t)~RTC_FLAG_RSF;
  while ((RTC->CRL & RTC_FLAG_RSF) == (uint16_t)RESET)
  {
  }
}