The Issue
- The PRODUCT product clock becomes slow sometimes to about 30s off after 1 or 2 hours, depends on unit.
- The real time clock runs from a timer on the MSP430. Timer source is the 32khz crystal and ACLK ocscillator.
Ideas
1.Our product uses a new chip, the MSP430F5635, maybe the chip has an issue?, or
2.The setup of the timer could be wrong, or
3.The crystal itself could be bad, or
4.Some other interrupt or other operation in the system is corrupting the clock values
For #1, I called our contact at Avnet (Rinzai.bell@avnety.com): he never heard of the issue, but he will check with TI
For #2 above, We use an older MSP430 in another released product. I thoroughly checked code: I migrated and checked the SW down to every bit in every register… I cannot find any error in this setup.
For #3, we checked the crystals: they gave error of typical 100 sec per month or less, standard for all the products
For #4, We now setup a basic program with the same OLED hardware, but only the timer running, to eliminate the rest of the dive computer… we will check at 4pm today … if it is of by even a few seconds, then we know the timer itself does not work right, because we have isolated it in the program and nothing else is running.
Update: this test was done, a simple program was setup to run the WDT in counter mode, using a 1000ms interrupt, setup using the code below, provided by TI supplied header files. After 1 hour and 40 min the time was off by 17 . At this point the only issue we can think of is the crystal or the MSP430F5635, and we believe it is not the crystal, it has to be the MSP430 ... please look into this as it is a production release for us, critical, and very bad for our product. We will not use this chip if it has an issue.
MOV.W #WDT_ADLY_1000,&WDTCTL ; WDT 1000ms, ACLK, interval timer