cancel
Showing results for 
Search instead for 
Did you mean: 

I2C SDA abnormal

Haifeng
Associate II

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.

3 REPLIES 3
S.Ma
Principal

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
Associate II

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
Guru

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".