I have managed to send and receive information from the PCF2129 via SPI with a microcontroller.
Both writing and reading is done from address 0x03 (seconds) to address 0x09 (years).
But I have discovered that sometimes you write or receive erroneous data. For example, once the RTCC has been correctly matched, both time and date, such information obtains inconsistent data.
I read section 8.8.8 of the datasheets and it indicates that regions from address 0x03 to 0x09 are blocked for security.
Could that be the cause that sometimes I get incongruous data?
If the answer is yes, my question is: How can I know what is the right time to read the information from these regions of the RAM?
Any comments or suggestions are welcome.
I had to solder wires to the SPI lines and the CE to connect a logic analyzer and determine what was happening.
It was a silly mistake, I was forgetting to put the CE terminal in logical 1 when the reading of all bytes was finished.
OK, good to know what was behind this issue, I also always use a logic analyzer to make sure the format and timing of the SPI traffic meet datasheet recommendations.
Chapters 8.8.8 of the PCF2129 datasheet and 18 of the UM10301 provide additional information regarding reading to/writing from the time and date registers. Our recommendation is to read all time registers in one single read operation, using the auto-increment function. Is this what you are doing in your code?