Skip to main content
Haifeng
Associate II
July 28, 2020
Question

I2C SDA abnormal

  • July 28, 2020
  • 3 replies
  • 1435 views

When I used the STM32L412KB as an I2C slave. when there only one slave on the bus, all the function works well. but if there hastwo devices on the bus and continue to access one slave device, the non-addressed I2C slave will damage the SDA bus. I captured the waveform, the SDA is driving high (not act as OD, act like as push-pull). if alternative to read the slaves (two slave devices), there is no error happened.

I used the CubeMX to get the configuration and initialization. The port configuration is attached.

This topic has been closed for replies.

3 replies

S.Ma
Principal
July 28, 2020

Each slave obviously have unique addresses, right?

Is the other slave an mcu?

Go debug mode and chech the gpio registers to confirm open drain mode. Registers don t lie.

Haifeng
HaifengAuthor
Associate II
July 28, 2020

Yes, two sensors has unique address (eg. 1 & 2)

all the slave is our products which use the STM32L412.

Check the register, all values looks no change

TDK
July 28, 2020

A slave can't drive SDA high if it's on open drain mode. I suggest you recheck your assumptions. Are both slaves identical apart from slave address? Both are STM32L4 chips?

"If you feel a post has answered your question, please click ""Accept as Solution""."