cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32CubeF4 I2C examples for different boards

Malek Mahar
Associate II

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 ?

1 ACCEPTED SOLUTION

Accepted Solutions

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 Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
Mike_ST
ST Employee

Hello,

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

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

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 Accept as Solution on the reply which solved your issue or answered your question.

hI @Amel NASRI​ ,

https://community.st.com/s/question/0D53W00000sqQt9SAE/i2c-between-two-stm32-boards-not-working

this is a more detailed post just I have just published,

thank you,