I'm doing the following experience:

I have a pressure sensor and I'm doing some readings using a Raspberry Pi 4 and a Black Pill (STM32F411CEU6), using an I2C connection. The sensor has pull-up resistors to 3.3V.

My problem is when I connect both RPI and the BP. In that setup, the BP is not capable to find the pressure sensor because of some conflict with the RPI. But at the moment I disconnect the RPI, the BP is able to find the sensor.

I have tried to disable the I2C from the RPI but did not work. I know that the RPI as pull-up resistors connected to its I2C pins but I don't understand how they could be reason for the problem, when the sensor itself also as pull-up resistors.

Any ideas?

1 Answer 1


It's not likely the pullups. It sounds like your RPi and your BP are both acting as I2C Masters, and AFAIK, "Multi-Master" operation is not supported on the RPi. Refer to this overview of the I2C protocol for an illustration of "Multi-Master" operation.

AFAIK, you cannot switch I2C on and off on the RPi without rebooting.

Perhaps the easiest solution is to set your BP as an I2C Slave. Your RPi can read the pressure sensor, and relay it back to the BP as a slave.

  • Ok, that's a good point. Thanks.
    – Miguel
    Aug 2, 2021 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.