Setting RTC in CY14B101P-SFXI | Cypress Semiconductor
Setting RTC in CY14B101P-SFXI
I having some trouble setting the real time clock with this particular NVRAM device. The exact sequence of events is as follows:
2. Write 0x02 to RTC register 0x00.
4. Write 7 bytes to RTC registers 0x09-0x0f.
6. Write 1 byte to RTC register 0x01.
8. Write 0x00 to RTC register 0x00.
Each of the above steps is standalone SPI transaction; the CS is pulled low for each and returns high before the next step. All values are legal BCD according to the data sheet. However, reading the RTC registers yields incorrect data and several bytes with values outside valid BCD values, which seems to mean that incorrect BCD data was loaded to begin with.