Electronics > Beginners

i2c pull-ups current

<< < (3/4) > >>

rstofer:
And we still don't know which MCU and which device...  Datasheet links are helpful.

In a perfect world, the I2C peripheral in the MCU will idle both lines high and, absent any load on the device, the external resistors will see no voltage drop and conduct no current.  If you disable the I2C gadget in the uC, I would expect that you would need to define the pins as input with or without internal pull-up.  You can get the anticipated pin currents from the datasheet.  IIH (input current pin high) is important.  There should be a similar spec for the pins when configured for I2C.

As to the device?  Who knows?  I would expect it to have nearly zero input current when powered (I am expecting a CMOS device and they have essentially 0 input current) and I have no idea how much current it draws in sleep mode.  But the idea is to keep the chip powered but in sleep mode so that the clk and data don't try to feed power to the device through the pull-up resistors to the ESD diodes.  Again, the input current specs should be given in the datasheet for both operating and sleep mode.

Without links to datasheets, everything is a guess!

0xdeadbeef:

--- Quote from: rookie on May 28, 2019, 06:37:56 pm ---The pullups are connected to vcc 3v with 4.7k resistors, about 500uA extra current is lost after this addition. After an i2c transaction, the i2c block is disabled, and device sleeps to save power. The behavior is normal by standards of i2c since the pull-ups job is to hold the line high, but because it is in low power mode, the block gets disabled and I assume the lines will need to be configured in a way that they don't draw current when idle?

--- End quote ---
A real I2C block won't have (fixed) internal pullups as this would contradict the idea of I2C (external pullup, open drain outputs -> 3.3V/5V tolerant). Actually true I2C peripherals don't have a push/pull stage configured to use only the lowside, but a true open drain output. So e.g. they can tolerate 5V on a 3.3V device even if no voltage is supplied. Indeed, for the same reason, true I2C pins typically also don't have configurable pull devices.

Besides, pullup/down configuration is typically a port/pad/pin feature, not one of the peripheral block. Anyway, the behavior of pull devices during powerdown depends on the device and the powerdown mode. Typically, pull devices are deactivated (only) in deep powerdown but still active in sleep mode. Again, that depends on the actual device and its powerdown/sleep modes.

In any case: if you're using normal port pins as I2C pins, make sure to configure them as open drain and to disable any internal pull device. Also check how the powerdown behavior is defined exactly and if you could also use dedicated I2C pins.

wraper:

--- Quote from: 0xdeadbeef on May 31, 2019, 10:10:27 am ---A real I2C block won't have (fixed) internal pullups as this would contradict the idea of I2C (external pullup, open drain outputs -> 3.3V/5V tolerant). Actually true I2C peripherals don't have a push/pull stage configured to use only the lowside, but a true open drain output. So e.g. they can tolerate 5V on a 3.3V device even if no voltage is supplied. Indeed, for the same reason, true I2C pins typically also don't have configurable pull devices.

--- End quote ---
I2C has nothing to do with interfacing devices powered from different voltage and generally you cannot do so without taking special measures. Pull-ups and open drain outputs are for attaching multiple devices on a single bus, nothing to do with 3.3V/5V tolerance. So internal pull-ups don't contradict with any ideas of I2C.

--- Quote ---Actually true I2C peripherals don't have a push/pull stage configured to use only the lowside, but a true open drain output.
--- End quote ---
High side mosfet present on the multipurpose pin does not do any harm. Effectively it is non existent there when interface is configured as I2C. Does not make it any less "true" I2C interface. Not to say normally ICs have protection diodes connected from the pins to GND and Vdd anyway, so here goes your "tolerance". Only some chips specially built to be tolerant to higher voltage can accept higher voltage than Vdd.

wraper:

--- Quote from: rookie on May 28, 2019, 06:37:56 pm ---The pullups are connected to vcc 3v with 4.7k resistors, about 500uA extra current is lost after this addition. After an i2c transaction, the i2c block is disabled, and device sleeps to save power. The behavior is normal by standards of i2c since the pull-ups job is to hold the line high, but because it is in low power mode, the block gets disabled and I assume the lines will need to be configured in a way that they don't draw current when idle?

--- End quote ---
The question is what voltage is used to power all ICs connected to this bus? Is power removed from any IC when the thing goes into sleep mode? BTW disabling pull-ups at sleep and leaving I2C bus without any pull-ups at all is not a good idea. I2C lines will become free floating and may cause ICs connected to the bus consume increased current (you should never leave CMOS inputs floating) and also can cause those ICs doing unknown operations caused by interference picked up by I2C lines.

0xdeadbeef:

--- Quote from: wraper on May 31, 2019, 03:37:47 pm ---I2C has nothing to do with interfacing devices powered from different voltage and generally you cannot do so without taking special measures. Pull-ups and open drain outputs are for attaching multiple devices on a single bus, nothing to do with 3.3V/5V tolerance. So internal pull-ups don't contradict with any ideas of I2C.

--- End quote ---
I2C is designed to be pulled up externally which allows using 3.3V and 5V devices on a common bus. Of course this only works if 3.3V devices use 5V tolerant pins. Using internal pullups contradicts this idea as different pullup voltages working against each other would obviously create issues.


--- Quote from: wraper on May 31, 2019, 03:37:47 pm ---High side mosfet present on the multipurpose pin does not do any harm.
Effectively it is non existent there when interface is configured as I2C.
--- End quote ---
Well, of course the FET and the clamping diode are still there. There might be 3.3V push/pull outputs which are fully 5V tolerant (even if the device isn't supplied anymore), but at least there are quite a few devices where only the dedicated open drain pins are fully 5V tolerant.


--- Quote from: wraper on May 31, 2019, 03:37:47 pm ---Does not make it any less "true" I2C interface.
--- End quote ---
Still, dedicated I2C pins don't need either a highside transistor or a pull device. So on quite a lot of microcontrollers, the dedicated I2C pins have neither. And usually only these pins are fully 5V tolerant for 3.3V microcontrollers.


Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod