cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble initializing the I2C interface

emmanuelkatto
Associate

Hi everyone, My name is Emmanuel Katto. I am having trouble initializing the I2C interface on the STM32F4 series. Could someone provide a simple example or point me to resources that detail the setup process?

 

Looking forward to your responses.

Thanks in advance!

Best,

Emmanuel Katto

3 REPLIES 3

Good video here on getting started with an STM32 Nucleo board:

https://www.youtube.com/watch?v=hyZS2p1tW-g

 

TDK
Guru

STM32CubeMX will provide the initialization code for you.

You can see an example usage of I2C here:

STM32CubeF4/Projects/STM32446E-Nucleo/Examples/I2C/I2C_TwoBoards_ComPolling/Src/main.c at e21c319e17a7f5aef332be677eaff2a0e7c316df · STMicroelectronics/STM32CubeF4 (github.com)

Note that I2C requires external pullups of around 2.2kOhm on the SDA and SCL lines.

If you feel a post has answered your question, please click "Accept as Solution".