AnsweredAssumed Answered

Issues with RTC

Question asked by benito.francisco on Aug 3, 2012
Latest reply on Aug 6, 2012 by benito.francisco
Hi gents,

We're using a STM32F217IGH6, in a Silica Xynergy board, and we're experiencing some strange issues with the RTC.

The code regarding RTC is:

static void rtcConfiguration(void)
{
   // Reset power domain : The only possible way of modifying the RTC clock source !!!
   PWR_DeInit();
 
  /* Enable PWR clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 
 
  /* Allow access to RTC  */
  PWR_BackupAccessCmd(ENABLE);
     
  /* Enable LSE clock */
  RCC_LSEConfig(RCC_LSE_ON);
     
  /* Wait till LSE is ready */
  while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET);
     
  /* Select LSE as RTC Clock Source */
  RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); 
     
  /* Enable RTC Clock */
  RCC_RTCCLKCmd(ENABLE);
 
  /* Wait for RTC registers synchronization */
  RTC_WaitForSynchro();
}

But the RTC doesn't behave as it should... sometimes it just doesn't tick, or it starts ticking, and after a few seconds, it stops.

We are working with an external 32.768kHz quartz, but changing to internal oscillator does not seem to solve the problem. 

Do you have any suggestion of what may be happening here?

Thanks a lot!!

Outcomes