Skip to main content
Malek Mahar
Associate II
June 10, 2021
Solved

Stm32CubeF4 I2C examples for different boards

  • June 10, 2021
  • 4 replies
  • 1267 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

4 replies

Mike_ST
ST Technical Moderator
June 10, 2021

Hello,

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
Malek Mahar
Associate 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

Amel NASRI
Amel NASRIBest answer
ST 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

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.