Skip to main content
Associate
July 6, 2023
Solved

STM32G070RBT6 I2C communication with ESP32 S3 C1 devkit

Hi, I am new to STM32, I am trying the i2c communication between stm32 and esp32. I am using STM32 as slave and ESP32 as Master. I am using Arduino IDE

I connected stm32  PB6-SCL, PB7-SDA to esp32  GPIO21-SDA, GPIO19-SCL.

i was not getting any response in the output. Can anyone help me with it.

Code is attached.

Thanks 

This topic has been closed for replies.
Foued_KH
Foued_KHBest answer
ST Employee
July 14, 2023

Hello @RamyaD , 

Could you please connect GND to GND.

Take an oscilloscope to check SDA and SCL behavior. 

Foued

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.

3 replies

Foued_KH
Foued_KHBest answer
ST Employee
July 14, 2023

Hello @RamyaD , 

Could you please connect GND to GND.

Take an oscilloscope to check SDA and SCL behavior. 

Foued

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.
RamyaDAuthor
Associate
July 24, 2023

HI @Foued_KH , 

It was done. Thanks for the replay.

RhSilicon
Lead
July 24, 2023

The Arduino IDE will mask a lot of things, the ideal would be to use the STM32CubeIDE for the STM32:

How to use I2C Communication in STM32 Microcontroller (Arduino IDE)

Getting started with I2C (STM32Cube)