2024-10-27 07:14 AM - last edited on 2024-10-27 08:54 AM by Tesla DeLorean
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
2024-10-27 08:53 AM
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.
2024-10-28 04:04 AM
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
2024-10-28 04:14 AM
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
2024-10-28 04:17 AM
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
2024-10-28 06:45 AM
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