travisgoodspeed / goodwatch

Replacement board for Casio Calculator Watches using the CC430F6147
504 stars 55 forks source link

RTC3 Errata Workaround #47

Closed travisgoodspeed closed 6 years ago

travisgoodspeed commented 6 years ago

The RTC3 errata, documented in SLAZ094V, causes some writes to the realtime clock registers to misbehave. In my case, it is currently causing writes to the RTCDAY register to be missed when first booting. Close this issue when we have a stable workaround that causes all writes to be reliable.

Description:

A write access to the RTC registers (SEC, MIN, HOUR, DATE, MON, YEAR, DOW) may result in unexpected results. As a consequence the addressed register might not contain the written data, or some data can be accidentally written to other RTC registers.

Workaround:

Use the RTC library routines, available as F541x/F543x code examples on the MSP430 Code Examples page (www.ti.com/msp430 > Software > Code Examples), which use carefully aligned MOV instructions. Library is listed as RTC_Workaround.zip and includes both CCE and IAR example projects that show proper usage. Using this library, full access to RTC registers is possible.