/* Wait for RTC registers to be synchronised with the APB1 bus. 
Time and Date are accessed through shadow registers which must be synchronized  */
void rtc_wait_for_synchro(void)
/* Wait for RTC registers to be synchronised with the APB1 bus. 
Time and Date are accessed through shadow registers which must be synchronized  */
void rtc_wait_for_synchro(void)
{
	RTC_WPR = 0xca;
	RTC_WPR = 0x53;
	RTC_ISR &= ~(RTC_ISR_RSF);
	while (!(RTC_ISR & RTC_ISR_RSF));
	RTC_WPR = 0xff;
}