cancel
Showing results for 
Search instead for 
Did you mean: 

I2C SCL and SDA low when reading PCF85063 registers

SteMMo
Associate III

Hi all,

i'm developing firmware for STM32MP135F-DK board to communicate with some external chips in I2C1.

No problems if I communicate with other I2C chips (clockgen, eeprom, io expander).

Communicating with the RTC PCF85063 chip happens that no problems if I send write command.

If I send a read registry command the I2C bus stucks with the SCL and SCK lines at low level. And the bus stays locked until MP135 reset. If i only power down, than power up, the PCF chip, the SDA line goes up but the SCL line stays low so again i2c locked.

I attached the scope screeshot: in particular I see the initial write/set current register acknoledged; when I send the read command I see the read packet with the chip address (0x51+1 bit high for read) but it is never acknoledged cause the lines levels..

The problem is always present even I change the register to read.

For each kind of communication I'0m using the HAL_I2C_* functions.

Any idea?

Thanks

9 REPLIES 9
PatrickF
ST Employee

Hi @SteMMo 

did you check the 32k oscillator is running on PCF85063 ?

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @PatrickF 

yes i checked it via CLKOUT pin as you can see in the image.

Thanks, regards

urbito
Senior II

have you tryed this suggestion from the datasheet?

urbito_0-1747822686069.png

seems like that is what you may be facing.

hope it helps.

greetings

Hi @urbito,

yes, I saw the note but I'm not yet be able to apply it, and then reset the chip.

But I'd like to know the cause of the problem! Just to avoid it.

Now the problem repeats itself constantly.

Thanks

urbito
Senior II

is it possible to you to share your PCF85063A schematic?

The schematic is very basic: so far, we have only a hand-wired board.

20250521_141529c.jpg

The communications with other chips are ok, on the same I2C bus.

The RTC chip on the board does not have the backup battery and capacitors.

I tested the reset procedure as stated on the datasheet.

If I run it without the RTC chip I see the (manual) clock I generate by code.

If I run it with the RTC chip and I fire the read command I have the problem: both SCL  and SDA pin low. If I run the reset code I see nothing (SCL always low). If I power off the RTC chip only the SDA pin returns high. The SCL stays low.

So, is it the RTC chip that lowers the SCL pin or the MP135 chip ???

SteMMo
Associate III

I'm very sorry.

I've just discovered that the RTC chip owns the same I2C address of the STM32G071 chip present on the 135DK demo board = 0x51 !!

(crying)

Still wondering why the clock stops ..

 

 

 

Hi,

I2C slave are allowed to stretch SCL low to add some kind of 'wait states'. I cannot explain why STM32G0 is doing that (and if he is the culpit), but I2C address conflict will certainly create strange behaviors.

Maybe try using another I2C bus out of I2C1 (or hack the board to force the STM32G0 in reset, but that's might be tricky).

Alternatively, you could just use the RTC which is inside STM32MP135F (might not fit your requirements in term of power or else).

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.