cancel
Showing results for 
Search instead for 
Did you mean: 

Two board I2C communication

Adi3
Associate

Iam Using 2 STM32F407VGT6 board one as master and another board as slave from Master side it is Transmitting but slave is showing the Bus error both Master and slave iam using in the inturrept mode  Screenshot 2025-07-09 112323.png

2 REPLIES 2
Ghofrane GSOURI
ST Employee

Hello @Adi3 

Make sure the hardware connections between the two STM32F407VGT6 boards are correct, including proper wiring of communication lines and the presence of required pull-up resistors  using I2C. Ensure both master and slave are configured with matching clock speeds and that the slave address matches the master's target address. Make sure the interrupt service routines properly handle and clear all relevant flags, especially the bus error (BERR) flag on the slave, to prevent persistent errors. Finally, use debugging tools to step through interrupt handlers and confirm the communication protocol is correctly working.

THX

Ghofrane

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.

Andrew Neil
Super User

Are you using the "I2C Two Boards" example provided by ST ?

If not, try that to start with.

See also: https://wiki.st.com/stm32mcu/wiki/Getting_started_with_I2C

 

As @Ghofrane GSOURI said, check your connections & pullups carefully - make sure you also have a common ground between the two boards.

Show your schematic, and some good, clear photos of the setup.

Have you used an oscilloscope or analyser to see what's happening on the I2C wires?

 

The trouble with using 2 boards like this is you don't know which end has the problem - or if both ends have problems!

See:

https://community.st.com/t5/stm32-mcus-boards-and-hardware/i2c/m-p/668411/highlight/true#M18743

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.