Author Topic: Linux i2cdetect generates nothing on SCLK  (Read 412 times)

0 Members and 1 Guest are viewing this topic.

Offline kishores

  • Newbie
  • Posts: 4
  • Country: in
Linux i2cdetect generates nothing on SCLK
« on: August 04, 2019, 02:39:32 pm »
Hi guys,
I am trying to interface an IO expander MCP23017 with Nano Pi Neo2 . I am using Friendly ELEC's Ubuntu 16.04 OS .
I am able to enable I2C 0 on the device and can find a device /dev/i2c-0 on the system .

However , I am not able to find the IO expander device at address 0x22 when I run i2cdetect . I have checked the signals on respective SCLK and get absolutely nothing . What options do I have besides changing the OS ?
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 5847
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Linux i2cdetect generates nothing on SCLK
« Reply #1 on: August 04, 2019, 04:16:23 pm »
Do you have pullup resistors on the bus?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline kishores

  • Newbie
  • Posts: 4
  • Country: in
Re: Linux i2cdetect generates nothing on SCLK
« Reply #2 on: August 04, 2019, 04:20:26 pm »
Yes . Even without the pullups I should be able to get some signal on them , right ?
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1113
  • Country: fi
Re: Linux i2cdetect generates nothing on SCLK
« Reply #3 on: August 04, 2019, 04:39:24 pm »
Some boards need to load a device tree overlay, or adjust some other boot parameter to configure the I/O. I think FriendlyElec has a tool called "npi-config" that lets you enable and disable peripherals.

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 2293
  • Country: gb
Re: Linux i2cdetect generates nothing on SCLK
« Reply #4 on: August 25, 2019, 12:46:53 pm »
Yes . Even without the pullups I should be able to get some signal on them , right ?

No, an I2C bus cannot operate without pull-ups.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 1644
  • Country: pl
Re: Linux i2cdetect generates nothing on SCLK
« Reply #5 on: August 25, 2019, 05:54:01 pm »
If SCLK is permanently LOW, try pullups. If it's permanently HIGH, it has to be something else.

Are you sure you are probing the right I2C bus and not, for example, some display output?
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 18595
  • Country: nl
    • NCT Developments
Re: Linux i2cdetect generates nothing on SCLK
« Reply #6 on: August 25, 2019, 10:31:38 pm »
SCLK is typically a naming convention for an SPI bus. On I2C you'd be looking for SCL (from SCL and SDA).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline BMK

  • Contributor
  • Posts: 25
  • Country: 00
Re: Linux i2cdetect generates nothing on SCLK
« Reply #7 on: August 26, 2019, 12:03:09 am »
With A64 it is easy to miss that there are multiple I2C buses. I2Cdetect needs to be given the appropriate bus number.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf