Skip to main content
Mohammed_BEN
Associate
March 14, 2022
Solved

hello, I am working in a project with STM32f100 and I want to set this MCU as a slave using I2C interface. the master should be raspberry PI so I need the address of STM32.

..

This topic has been closed for replies.
Bubbles
BubblesBest answer
ST Employee
March 14, 2022

You need to configure the address in the I2C register, I2C_OAR1 or I2C_OAR2. More info in RM0008.

BR,

J

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.

4 replies

Bubbles
BubblesBest answer
ST Employee
March 14, 2022

You need to configure the address in the I2C register, I2C_OAR1 or I2C_OAR2. More info in RM0008.

BR,

J

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.
Mohammed_BEN
Associate
March 15, 2022

I have configured a slave address in CUBEMx, but when I open my raspberry and try to detect I2C signal, I can't see any thing. any suggestions?

Bubbles
ST Employee
March 15, 2022

what code is loaded to the STM32? Try some example from the Cube Introduction package. There are several examples of I2C communication.

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.
Mohammed_BEN
Associate
March 15, 2022

ok thank you, now is working I can get some a result