PCF85263 RTC I2C Communication Issue - All Registers Returning 0x00

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

PCF85263 RTC I2C Communication Issue - All Registers Returning 0x00

Jump to solution
2,357 Views
ohck
Contributor I

Hi,

I'm configuring the PCF85263 RTC and encountering an issue where all registers return 0x00 when I attempt to read them via I2C. Here’s my setup and the steps I’ve followed:

HW setup:

- PCF85263 rtc connected to a Quectel BG95-m3 module.

- pull-up resistors are present

Issue:

- I have tried to write different commands to different registers but when verifying the registers state they all return as 0x00

Steps I have taken:

- I have confirmed that the rtc gets 1.8v on VDD, SDA and SCL using a multimeter.

- Tested on two separate devices.

 

My code is in the attached file(set_alarm function gets called).

Is there some step I'm missing in the configuration?

Thanks in advance.

0 Kudos
Reply
1 Solution
2,336 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Oscar,

If you have a logic analyzer or an oscilloscope, could you please share some screenshots to check what is going on the bus?

It should also help us to verify each I2C operation's acknowledgment. If a command is not acknowledged, subsequent operations could fail.

Looking at your code, the I2C device address being used is correct. Just verify if the I2C library expects this 7-bit address (0x51) and automatically handles the read/write bit.

BRs, Tomas

 

View solution in original post

0 Kudos
Reply
2 Replies
2,337 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Oscar,

If you have a logic analyzer or an oscilloscope, could you please share some screenshots to check what is going on the bus?

It should also help us to verify each I2C operation's acknowledgment. If a command is not acknowledged, subsequent operations could fail.

Looking at your code, the I2C device address being used is correct. Just verify if the I2C library expects this 7-bit address (0x51) and automatically handles the read/write bit.

BRs, Tomas

 

0 Kudos
Reply
2,274 Views
ohck
Contributor I
Thank you, forgot to answer... Got a logic analyzer and looking at the addresses I found out that I had to use the 0x51 address as is. Our other sensors required the R/W bit included in the address so I thought this one also needed.
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1978175%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPCF85263%20RTC%20I2C%20Communication%20Issue%20-%20All%20Registers%20Returning%200x00%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1978175%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI'm%20configuring%20the%20PCF85263%20RTC%20and%20encountering%20an%20issue%20where%20all%20registers%20return%200x00%20when%20I%20attempt%20to%20read%20them%20via%20I2C.%20Here%E2%80%99s%20my%20setup%20and%20the%20steps%20I%E2%80%99ve%20followed%3A%3C%2FP%3E%3CP%3EHW%20setup%3A%3C%2FP%3E%3CP%3E-%20PCF85263%20rtc%20connected%20to%20a%20Quectel%20BG95-m3%20module.%3C%2FP%3E%3CP%3E-%20pull-up%20resistors%20are%20present%3C%2FP%3E%3CP%3EIssue%3A%3C%2FP%3E%3CP%3E-%20I%20have%20tried%20to%20write%20different%20commands%20to%20different%20registers%20but%20when%20verifying%20the%20registers%20state%20they%20all%20return%20as%200x00%3C%2FP%3E%3CP%3ESteps%20I%20have%20taken%3A%3C%2FP%3E%3CP%3E-%20I%20have%20confirmed%20that%20the%20rtc%20gets%201.8v%20on%20VDD%2C%20SDA%20and%20SCL%20using%20a%20multimeter.%3C%2FP%3E%3CP%3E-%20Tested%20on%20two%20separate%20devices.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EMy%20code%20is%20in%20the%20attached%20file(set_alarm%20function%20gets%20called).%3C%2FP%3E%3CP%3EIs%20there%20some%20step%20I'm%20missing%20in%20the%20configuration%3F%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1983666%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20PCF85263%20RTC%20I2C%20Communication%20Issue%20-%20All%20Registers%20Returning%200x00%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1983666%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThank%20you%2C%20forgot%20to%20answer...%20Got%20a%20logic%20analyzer%20and%20looking%20at%20the%20addresses%20I%20found%20out%20that%20I%20had%20to%20use%20the%200x51%20address%20as%20is.%20Our%20other%20sensors%20required%20the%20R%2FW%20bit%20included%20in%20the%20address%20so%20I%20thought%20this%20one%20also%20needed.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1978313%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20PCF85263%20RTC%20I2C%20Communication%20Issue%20-%20All%20Registers%20Returning%200x00%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1978313%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Oscar%2C%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20a%20logic%20analyzer%20or%20an%20oscilloscope%2C%20could%20you%20please%20share%20some%20screenshots%20to%20check%20what%20is%20going%20on%20the%20bus%3F%3C%2FP%3E%0A%3CP%3EIt%20should%20also%20help%20us%20to%20verify%20each%20I2C%20operation's%20acknowledgment.%20If%20a%20command%20is%20not%20acknowledged%2C%20subsequent%20operations%20could%20fail.%3C%2FP%3E%0A%3CP%3ELooking%20at%20your%20code%2C%26nbsp%3Bthe%20I2C%20device%20address%20being%20used%20is%20correct.%20Just%20verify%26nbsp%3Bif%20the%20I2C%20library%20expects%20this%207-bit%20address%20(0x51)%20and%20automatically%20handles%20the%20read%2Fwrite%20bit.%3C%2FP%3E%0A%3CP%3EBRs%2C%20Tomas%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E