cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble establishing I2C communication between 2 STMs

Vkada.858
Associate

I am trying to establish I2C communication between 2 STMs. The master is NUCLEO-L432KC and the slave is NUCLEO-L412KB. I changed the address of slave in cubeMX to 0x01 which is in the 7-bit address format. But I am not able to send or receive data. The function HAL_I2C_IsDeviceReady(&hi2c1,0x02,2,10) returns HAL_BUSY all the time.

I powered the master using a usb connector to laptop and the other STM i.e; slave uses 5v pin from master STM.

I attached the master and slave codes below.

Thank you in advance

1 REPLY 1
berendi
Principal

What are the values of the pullup resistors, how are they connected?