This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FG4619: RTC

Part Number: MSP430FG4619

I use inside RTC of MSP430FG4619, the code: 

SCFI0 =0;//0x04 ; // D=1, MCLK 1.3 - 12.1 MHz
SCFQCTL = 60;//121; // (121+1) x 32768 x 2 = 7995392; 3.99 Mhz (3997696)
FLL_CTL0 = DCOPLUS + XCAP18PF; // DCO+ set so freq= xtal x D x N+1
FLL_CTL1 = 0x20;

RTCCTL = RTCHOLD + RTCMODE_3 + RTCTEV_0 + RTCIE; //RTCBCD + no BCD, Real Clock, minutes Interrupt

I use 32768 crystal on Xin/Xout pin.

The RTC looks like work well, but after a year running, it has a big off in some cases, like 10 hours slow.

why like that? how accuracy it should be ?

thanks a lot

jim

  • jim wang2 said:
    why like that? how accuracy it should be ?

    Year have 8766 hours, 10 hours difference per year would be 1140 ppm (parts per million). Typical watch crystal have +/- 20ppm  - considering everything including temperature, drive strength, load capacitance are within specs. 10 hours per year is horribly too much of an error.

    First - you shall start with reading slaa322 and slaa367. Then check your crystal specification, paying special attention to load capacitance. Also you shall check your board layout and either calculate or measure stray capacitance of leads connecting crystal. The best way is to route ACLK to output pin and __measure__ oscillator frequency using frequency counter having enough precision for task. Then you will know for sure - it is frequency off or something wrong in your firmware.

    [edit] If frequency is too slow, then load capacitance is too big meaning XCAP18PF is too much.

  • So, based on your information, if off 20 to 30 minutes a year, it should be normal, right? thanks
  • e2e.ti.com/.../1303297

    Not sure if the F5529 RTC is similar to FG4619, but the above post shows a problem with RTC and the solution...

**Attention** This is a public forum