Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
915 Views

i2c programmable pull-ups

Hi,

I am working on a custom board for the edison. So for the I2C communication I want to know if the edison uses its programmable pull-ups.

Refering to the module guide there are different programmable pull-ups available. (http://download.intel.com/support/edison/sb/edisonmodule_hg_331189004.pdf http://download.intel.com/support/edison/sb/edisonmodule_hg_331189004.pdf )

Are these pull-ups used if I programm the I2C Interface using mraa?

Are different pull-ups used depending on the bus speed?

Are pull-ups used if I use the I2C Interface using system commands?

Thanks for your help.

Flo1991

0 Kudos
8 Replies
asss
Valued Contributor II
31 Views

Hi,

Are these pull-ups used if I programm the I2C Interface using mraa?

As I remember for Edison Arduino board and Edison Miniboard pull-ups for I2C are disabled after I2C interface initialization using MRAA.

I strongly recommend to setup a pull-up configuration after I2C bus initialization.

You may change it as you need by using mraa_gpio_mode function after I2C initialization.

Are different pull-ups used depending on the bus speed?

It is possible to configure pull-ups as you need after changing a bus speed.

Are pull-ups used if I use the I2C Interface using system commands?

Yes, they are used in the state selected before you use system commands.

If you do not configure a pull-up state, a previous state is used.

BR,

xbolshe

idata
Community Manager
31 Views

Can you tell me what is the default state if I use the I2C interface?

I am working on a custom board and realized that external pull-ups must be a few kilos, also if I chose the high speed mode (which normally uses a pull-up around 1k ohm)

So it would be interesting if an external pull-up should be used, or if the internal values should be used depending on the bus speed.

Flo1991

asss
Valued Contributor II
31 Views

Can you tell me what is the default state if I use the I2C interface?

About MRAA I have written above. In the general case just power your board off,

power on and check states of GPIO 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 208, 209, 210, 211, 212, 213.

BR,

xbolshe

idata
Community Manager
31 Views

Thanks for your help, can you please tell me how to check these states?

Btw. GP216 and so on are not available at the edison module (are they used internally? what are they used for?)

Flo1991

asss
Valued Contributor II
31 Views

May you provide an output of the following commands?

# cat < /sys/kernel/debug/gpio

# uname -a

BR,

xbolshe

idata
Community Manager
31 Views

Do you still need help with this thread?

 

 

-Sergio

 

idata
Community Manager
31 Views

Sorry for the late reply, I have been working on another important aspect of the board...

here is the command output:

root@Edison3Antenna:~# cat < /sys/kernel/debug/gpio

GPIOs 0-191, pci/0000:00:0c.0, 0000:00:0c.0:

gpio-61 (SW1UI4 ) in hi

gpio-64 (bcm43xx_irq ) in hi

gpio-71 (bcm_bt_lpm ) out hi

gpio-77 (sd_cd ) in hi

gpio-96 (vwlan ) out hi

gpio-124 (hsu ) in lo

gpio-125 (hsu ) out lo

gpio-126 (hsu ) in hi

gpio-127 (hsu ) out hi

gpio-128 (hsu ) in hi

gpio-129 (hsu ) in hi

gpio-130 (hsu ) in hi

gpio-131 (hsu ) in hi

gpio-132 (hsu ) in lo

gpio-133 (hsu ) out lo

gpio-134 (hsu ) in hi

gpio-184 (bcm_bt_lpm ) out lo

gpio-185 (bcm_bt_lpm ) in lo

root@Edison3Antenna:~# uname -a

Linux Edison3Antenna 3.10.17-poky-edison+ # 2 SMP PREEMPT Wed Jun 15 11:13:10 CEST 2016 i686 GNU/Linux

With this output no external pull-ups are connected.

If you look at this: http://www.i-programmer.info/programming/hardware/9618-exploring-edison-beyond-mraa-.html?start=1 Exploring Edison - Beyond mraa

you can see that there are different onboard pull-ups that can be programmed. I suppose mraa does not use this option, does it?

Flo1991

idata
Community Manager
31 Views

If you look at the link you shared, at the beginning of the "Controlling the GPIO Mode", there's a note that says that not all the possibilities of changing GPIOs are available with MRAA.

 

 

There's a thread with a similar discussion here /thread/56312 https://communities.intel.com/thread/56312

 

 

-Sergio

 

Reply