cancel
Showing results for 
Search instead for 
Did you mean: 

Pull resistor in I2C in STM32f334

SADEP.1
Associate

I am using STM32f334 I2C as master and my slave is Arduino UNO

My problem is I am unable to receive anything from my master

I think the problem here is pull resistor, first I tried using Internal pull resistor but it did not work, then I tried with 2k ohm resistor but did not notice any change

can someone help me what I am missing

1 REPLY 1
Danish1
Lead II

I2C is a complicated protocol. It consists of one (or more) master devices and at least one slave device.

Very often the slave(s) will be relatively simple chips that cannot be programmed and the I2C interface works without question. The connections SCL and SDA have pull-up resistors. Each slave has an address so that more than one may be on the same I2C bus; get that wrong and a slave will assume the message is for another device and not respond.

You tell us that your slave is an Arduino UNO, which (as far as I know) is programmable.

We have no way to tell (from the information you've given us so far) if the problem is with the program the stm32 master is running, the program the Arduino slave is running, or the wires between. Please let us know how you're trying to use the I2C - sharing the source-code helps.

Something I find very helpful when debugging I2C is an oscilloscope, looking at the SCL and SDA lines. If you have access to one, please post an image of the activity on the I2C bus.