This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTC Problem in LPC1768

Hello, I'm having problems with RTC in LPC1768. The RTC is running, but is advancing approx 5 seconds per hour. The electrical circuit is good, with a 20ppm crystal tolerance, and 12,5pf capacitors of load. Tha VBAT is conected in CR1220 lithium battery. I have reviewed the source code and is OK. Below is my code:

void InitRTC(void) {
  LPC_RTC->CCR  =    ( !CLKEN |  CTCRST );
  LPC_RTC->CCR &= ~CTCRST;
  return;
}
/***************************/
void StartRTC(void){
  LPC_RTC->CCR |=    ( CLKEN );
  return;
}
/***************************/
int main (void){
  char temp[36];
  InitRTC();
  StartRTC();
  while(1){
    sprintf ((char *)temp,"%2.2d/%2.2d/%.2d   %2.2d:%2.2d",LPC_RTC->DOM,LPC_RTC->MONTH,LPC_RTC->YEAR,LPC_RTC->HOUR,LPC_RTC->MIN);
    lcd_gotoxy(1,0);
    lcd_print(temp);
  }
  return 0;
}

The RTC is running correctly without the battery, with main power connected in VBAT. But yet the RTC is running advancing. I can't use the calibration of application note AN10849. I have 100 identical hardwares, and they are with different accurate. I think that this variation is very high for be simply a low accuracy of LPC. There must be some other problem.

Does anyone know what might be happening?
Thanks

Parents
  • On the other hand, NXP have had their share of RTC issues.

    The LPC23xx series have a hw goof making the RTC power line consume loooots of power.

    And the LPC17xx got an errata about temperature issues, without NXP specifying exactly how large temperature range that the RTC could be trusted.

Reply
  • On the other hand, NXP have had their share of RTC issues.

    The LPC23xx series have a hw goof making the RTC power line consume loooots of power.

    And the LPC17xx got an errata about temperature issues, without NXP specifying exactly how large temperature range that the RTC could be trusted.

Children
No data