Skip to main content
Visitor II
June 10, 2021
Solved

Stm32CubeF4 I2C examples for different boards

  • June 10, 2021
  • 1 reply
  • 1237 views

Hi,

Im trying to establish an I2C communication between stm32f446nucleo board and stl32f469i disco board,​

I flashed the stm32f446-nucleo I2C master code example from cubeF4stm32f446 into an stm32f446 nucleo board and the slave I2C code example from cubeF4-stm32f496i disco into an stm32f469i disco board,

As a result i get an indication ( LedToggle ) that there was an error during communication,

​​

Is what I did correct ?

    This topic has been closed for replies.
    Best answer by Amel NASRI

    Hi @Malek Mahar​ ,

    If problem is still there, I have some proposals/questions:

    • is there any error flag set in I2C status register while debugging?
    • make sure to add GND wires (refer to readme files for each example where used pins are precised)
    • make sure that you choose properly between Master and Slave through "#define MASTER_BOARD" in the "main.c" file

    -Amel

    1 reply

    Technical Moderator
    June 10, 2021

    Hello,

    Have you tried to debug, do you see something on the I2C lines ?

    Visitor II
    June 16, 2021

    Yes I did, the problem was related to the hardware part, SDA and SCL not changing from HIGH to LOW,

    thank you for your answer

    Technical Moderator
    June 16, 2021

    Hi @Malek Mahar​ ,

    If problem is still there, I have some proposals/questions:

    • is there any error flag set in I2C status register while debugging?
    • make sure to add GND wires (refer to readme files for each example where used pins are precised)
    • make sure that you choose properly between Master and Slave through "#define MASTER_BOARD" in the "main.c" file

    -Amel