Skip to main content
Visitor II
July 6, 2023
Solved

STM32G070RBT6 I2C communication with ESP32 S3 C1 devkit

  • July 6, 2023
  • 2 replies
  • 3815 views

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.
    Best answer by Foued_KH

    Hello @RamyaD , 

    Could you please connect GND to GND.

    Take an oscilloscope to check SDA and SCL behavior. 

    Foued

    2 replies

    Foued_KHAnswer
    ST Employee
    July 14, 2023

    Hello @RamyaD , 

    Could you please connect GND to GND.

    Take an oscilloscope to check SDA and SCL behavior. 

    Foued

    RamyaDAuthor
    Visitor II
    July 24, 2023

    HI @Foued_KH , 

    It was done. Thanks for the replay.

    Graduate II
    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)