Forums - i2c pull-up resistor

9 posts / 0 new
Last post
i2c pull-up resistor
kian
Join Date: 8 Jun 16
Posts: 43
Posted: Tue, 2016-07-19 05:39

Hi All,

I am connecting an external i2c accelerometer to the CSR1010. I understand that the i2c lines have internal pull-ups that can be enabled, and it was discussed in the old CSRMesh forum that external i2c pullup resistors is not necessary.

https://forum.csr.com/forum/main-category/main-forum/hardware/45758-stra...

I have initialized the i2c lines using these commands:

extern void I2CcommsInit(void)

{

/* Configure the I2C controller */

I2cInit(I2C_RESERVED_PIO,

I2C_RESERVED_PIO,

I2C_POWER_PIO_UNDEFINED,

pio_i2c_pull_mode_strong_pull_up);

 

/* Configure the I2C clock */

I2cConfigClock(I2C_SCL_400KBPS_HIGH_PERIOD, I2C_SCL_400KBPS_LOW_PERIOD);

 

/* Enable the I2C controller */

I2cEnable(TRUE);

}

 

The strange problem I am having now is that I have tried with 2 different accelerometers, BMA250 and BMA250E, the BMA250E is an upgraded version of the BMA250. With the BMA250 accelerometer, I don't need external pull-up resistors. But with the BMA250E, it wouldn't work unless I put external i2c pull up resistors.

 

It just doesn't make sense to me. I presume with internal i2c pull-ups, it should work with any type of i2c sensors. Anyone can help or comment?

 

 

 

 

  • Up0
  • Down0
Dr. Nissim Zur
Profile picture
Join Date: 6 Jun 16
Location: Skype: nissim.test CSR1010 External design house
Posts: 235
Posted: Tue, 2016-07-19 12:05

i2c pull-ups are needed when the I2C lines are too long, or not deferential. 

They  must be parallel to each other. and 100% same path and size. 

If they are also the EEPROM I2C lines, enable PIO2 so the EEPROM will not impose a load on the lines. 

You can call my  Skype if that not clear. 

 

  • Up0
  • Down0
kian
Join Date: 8 Jun 16
Posts: 43
Posted: Wed, 2016-07-20 00:21

Hi NIssim,

I have a custom PCB, the i2c lines are short and the accelerometer is placed closed to the CSR1010 i2c pins. I am pretty sure its not a problem with the layout since the same pcb works with the BMA250 but not the BMA250E.

I tried soldering new a CSR1010 chip with new BMA250E on a new PCB and its still the same problem, so I am sure somehow the CSR1010 doesn't like this BMA250E chip. There is minor differences between the BMA250 and BMA250E.

 

What do you mean by enabling PIO2? I am sharing the i2c lines with EEPROM. I noticed that PIO2 is connected to the VCC of the EEPROM. Do I have to turn on the EEPROM when I want to use i2c communication so as to not impose a load? I don't think this is an issue.

Anyone one else had similar problems working with other i2c sensors? Do you need to use external pull up with your sensors?

  • Up0
  • Down0
kian
Join Date: 8 Jun 16
Posts: 43
Posted: Wed, 2016-07-20 03:09

Just to add another point, I can't really use i2c external pull-up resistors because they consume too much current. My application is running on batteries and with external i2c pull up resistors connected, it constantly draining current from my battery. I presume the i2c pins is in a low state when released. Unless someone can advise me on how I can have the i2c pins in a high state when released so that it doesnt drain any current.

 

 

  • Up0
  • Down0
kian
Join Date: 8 Jun 16
Posts: 43
Posted: Fri, 2016-07-22 05:57

Anyone from CSR can help answer this?

I still cannot solve this problem. What could be the cause of i2c internal pull ups not working for my sensor (accelerometer)? And if I were to use external i2c pull-up resistors, how I can prevent constant current drain from the pull-up resistors?

  • Up0
  • Down0
kian
Join Date: 8 Jun 16
Posts: 43
Posted: Mon, 2016-07-25 05:45

Anyone can help?

I really need to solve this problem.

  • Up0
  • Down0
Dr. Nissim Zur
Profile picture
Join Date: 6 Jun 16
Location: Skype: nissim.test CSR1010 External design house
Posts: 235
Posted: Mon, 2016-07-25 06:21

Call my Skype nissim.test I will try to help

  • Up0
  • Down0
glenn1
Join Date: 2 Sep 16
Posts: 4
Posted: Fri, 2016-09-02 14:28

Kian,

Why does having an internal pullup use less power than an external pullup?  Seems to me that you could size the external as high as possible to use as little current as possible during a low condition and make the external a better option.  When the bus is idle turning off the pullups would do no good since the idle state is high on both lines which uses no current.

  • Up0
  • Down0
kian
Join Date: 8 Jun 16
Posts: 43
Posted: Mon, 2016-09-05 21:20

Hi Glenn,

I verified and tested it. With external i2c pull up resistors, its indeed drawing extra current. I can't use very large pull up resistors too because when the value is too large, the i2c comunication will not work.

Somehow, with internal pull up resistors, they don't consume as much current.

Thats my observation.

 

Cheers,

Kian

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.