PCA21125 RTC Writing the Registers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCA21125 RTC Writing the Registers

309 Views
AshBirari
Contributor I

Hello NXP,
When I attempt to read the written registers using SPI Command 0x90, the default value of the registers remains unchangeable. I have attempted to write the registers of the PCA21125 RTC clock using SPI Command 0x10.

Eg. 
1. Writing register Minute_Alarm with value 0x11

   i. Expected read value of Minute_Alarm Reg : 0x11 : 0001 0001

2. Reading Minute_Alarm after write command :
  i.  observed read value of Minute_Alarm : 0x91 : 1001 0001

0 Kudos
2 Replies

297 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Ashwini,

I always recommend to check at first the SPI format and timing as in most cases it is the root cause of such issues.

The PCA21225 uses mode 0 (CPOL = CPHA = 0), meaning the SPI clock idles at a low level and samples on the rising edge. 

As for the timing, make sure the dynamic characteristics shown in Table 43 of the datasheet are met.

Hope it helps.

BR, Tomas

0 Kudos

259 Views
AshBirari
Contributor I

PCA21125 is having 3 wire SPI protocol, as per my knowledge here spi modes are not configurable. can you elaborate on timing issue with an example. 

0 Kudos