Skip to main content
Graduate
October 27, 2024
Question

How to enable I2C - STM32F411

  • October 27, 2024
  • 2 replies
  • 3185 views

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

    This topic has been closed for replies.

    2 replies

    Graduate II
    October 27, 2024

    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.

    ST Employee
    October 28, 2024

    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

    ezioallAuthor
    Graduate
    October 28, 2024

    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

    ezioallAuthor
    Graduate
    October 28, 2024

    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