cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable I2C - STM32F411

ezioall
Associate II

how to activate I2C
Good morning
I'm trying to make a project that requires the I2C1 bus work
if I load the compiled project on arduino
from debug the application crashes because it can't read the EEPROM on RTC
I've read various documents but I can't understand how to activate the bus on the STMF411 processor
I'm quite new to STM
with esp32 there are no problems
here it seems more complicated to me

5 REPLIES 5

Yes, programming hardware frequently more complicated than presented by Arduino where someone else has worked out the drivers and libraries

The 7-bit Slave Address on STM32 is the High Order 7-bits, not the Low Order. So frequently (SlaveAddr << 1) in translation/conversion.

Look at the documentation for the IC you are connecting, usually sets forth the expectations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MOBEJ
ST Employee

Hello @ezioall , 

You can refer to this example from STMicroelectronics: I2C_TwoBoards_ComPolling Example. This example demonstrates how to handle I2C communication between two boards, which might be helpful for your case involving STM32 and Arduino.

Br

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

Il MOBEJE
this code should be fine
but i have to insert my code which is composed of several .H files and the src folder
i will have to study a little

hi  Il MOBEJE
this code should be fine
but i have to insert my code which is composed of several .H files and the src folder
i will have to study a little

Hello @ezioall 
You can get started with this article that explains how to use I2C in STM32 examples: 
Getting started with I2C. It should help you integrate your code with the example.

Thank you 

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.