When PCF2129 information should be read/write?

cancel
Showing results for 
Search instead for 
Did you mean: 

When PCF2129 information should be read/write?

319 Views
dominusdrr
Contributor III

Hi.

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.

Fabián

4 Replies

214 Views
dominusdrr
Contributor III

Hi.

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.

0 Kudos

214 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Fabian,

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. 

Best regards,

Tomas

214 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Fabian,

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?

Best regards,

Tomas

214 Views
dominusdrr
Contributor III

That's exactly what I'm doing, I point to address 0x03 and by auto increment I read all the other bytes up to address 0x09

0 Kudos