element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Weird I2C Issue with Pi CM3 [SOLVED]
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 39 replies
  • Subscribers 672 subscribers
  • Views 9898 views
  • Users 0 members are here
  • raspberry
  • i2c
  • issue
  • wiring
  • connection
  • jessie
  • protocol
  • raspbian
  • compute module
  • linux
Related

Weird I2C Issue with Pi CM3 [SOLVED]

balearicdynamics
balearicdynamics over 8 years ago

This is a strange issue I have no idea how to solve; it seems I am unable to debug correctly the problem to find at least what class of issue it is.

 

I have tried several I2C devices set as slave including Infineon XMC1100 Boot KitXMC1100 Boot Kit and Arduino UNOArduino UNO. Then I moved to the simple two cap sense buttons PmodCDC1PmodCDC1 by Digilent; as the device is powered and connected to the I2C bus it starts in continue sending data. I should expect to see at least its address will be detected by the CM3 I/O board but nothing happens.

image

I2C has been set and enable correctly in /boot/config.txt and the raspbian version running on the eMMC of the CM3CM3 is the latest Jessie (July, 5 , 2017). Signals are connected to the GPIO2 and GPIO3 (SDA1, SCL1) accordingly with the eLinux table specifications (see in attach) to the GPIO Pins 2 and 3. Digilent device is powered with the 3V3 and voltage is correct and stable.

I have not used external pull-up resistors on SDA/SCL signals as the CM3 already includes 1.8K pull-up resistors on these two lines, following the CM3 peripheral recommendations.

imageimage

Initially I though that it was possible that wrong resistor values was blocking the signals to go up but as shown in the video below, hardware seems working fine. Note that when I send a i2cdetect -y 1 command from the terminal data are sent by the CM3 side. But nothing is shown.

Any suggestion is welcome.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Update

Supposing that despite what the documentation says the internal pull-up resistor is not enabled I have added a 1.5K resistor pulled up to the 3V3 (the nearest I have at home respect the declared in the documentation (1K8). What I get with the protocol analyser is a series of packets as shown in the images below but always nothing is detected by the master (Pi side).

image

image

image

image

 

Last update

After trying and discussing with all the helpful members that spent time with me I have received in the meantime a second Pi Compute Module IO board and as all the suggested tests and possible mistakes was converging to the right setup for the I2C protocol, as expected, the problem was for  some unknown reason the board itself. As I replaced the board with a new one things started working perfectly.

 

Thanks to shabaz Robert Peter Oakes rew Jan Cumps and... johnbeetem for the useless suggestion of the thread image LoL

 

Update

After the last testing and following some suggestions of the starting supposition is that - together with the I/O board - also the Compute Module 3 booting from the eMMC maybe with some hardware failure as all the tests with the Compute Module 3 Lite booting from the eMMC is working fine with the same Raspbian distribution, desktop version (instead of headless like on the eMMC side).

 

First test: a new microSD with the Raspbian Jessie Lite has been set and after booting the Compute Module 3 Lite I have done the same setup of the Compute Module eMMC. At this point bot boards runs the same version. And after sudo update / upgrade the command i2cdetect -y 1 works perfectly! So we can think 90% sure that the issue is in the Compute Module 3 with eMMC memory. Remain a last test to see if this issue is systematic or not: flashing another Compute Module 3 eMMC and see if it work.

 

Update - Conclusion

After doing the test mentioned in the update above a new Compute Module 3 eMMC board has been setup with a fresh installation and with the same connections of the previous settings, same Jessie Lite July 2017 and I2C protocol worked immediately without problems. So, the main issue was the CM3 eMMC board and the I/O board kit.

image

 

XMC1100 Boot Kit + TLE94112LE I2C communication

The setup of the two boards (XMC1100 + TLE94112LE) connected to the CM3 via the I2C bus was creating a trouble on the bus signals so that the i2cdetect -y 1 command was no longer able to recognise any connected peripheral.

The board has been configured as slave on the address 0x04. A check with the same software and the same hardware setup using and Arduino UNO instead was working fine. Investigating on this issue I have found the problem was already known involving Wire library version for the XMC1100 board updated by mhollfelder on the Infineon XMC1100 GitHub repository, the Pull Request #13.

On Aug, 31, 2017 Manuel (thanks) completed the update of the pull request, merged in the main and released a new XMC1100 Arduino board core  library version 1.0.4 (the module downloadable / upgradable in the Board Manager of the Arduino IDE) and all worked fine with the Infineon board alone connected to the I2C bus.

 

As I have integrated the XMC1100 Boot Kit board with the TLE94112LE DC Motor controller I have included the the TLE94112 Arduino library in the sketch detecting another non-blocking issue in the I2C Wire library (XMC1100 version) and opened the issue #14

The behaviour details are explained in the issue note; the problem can be easily avoided initialising the Wire library as the last call in the Setup() method of the sketch ;twe can consider this the workaround to the problem until it is not definitely solved.

Attachments:
imageRPi BCM2835 GPIOs - eLinux.pdf
imageRPI-CMIO-V3_0-SCHEMATIC.pdf
  • Sign in to reply
  • Cancel
  • Jan Cumps
    Jan Cumps over 8 years ago in reply to Jan Cumps

    Enrico, can you check that clock signal, and maybe use a higher resolution?

    The capture below (for another ic) has a pattern that I'd expect, with a train of clock ticks generated by the master. It has a rhythm in it. I don't find that back on your captures.

     

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 8 years ago in reply to Jan Cumps

    You have used J1-09 and J1-11 for SDA  and SCL?

    (and how do you tell that the i2ctools use i2c #1, not i2c #0 ?  - what does this linux command return: ls /dev/*i2c* ?)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rew
    rew over 8 years ago in reply to Jan Cumps

    Would it be an idea to test such things on an "easier" piece of hardware, just a normal raspberry pi 3?

    (I was already half-typing: but it needs to be P1-3 and P1-5, but that's on a normal raspberry...)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to Jan Cumps

    Hi Jan, as I wrote in the original post,

     

    Signals are connected to the GPIO2 and GPIO3 (SDA1, SCL1) accordingly with the eLinux table specifications (see in attach) to the GPIO Pins 2 and 3. Digilent device is powered with the 3V3 and voltage is correct and stable.

     

    Your consideration is correct but there was no mistake. I have used the I2C 1 while 0 - in the Compute Module it is not reserved for the HAT but is anyway for internal usage - is not manage by default. The pins on the GPIO board connector for CM are 2 & 3 instead of 9 & 11 on the Pi3 boards...

     

    Now: All your efforts and suggestions were correct. You addressed me avoiding a lot of extra tests and confirmed that most of my settings was anyway correct. So, what is the point?

     

    Eliminated the impossible, what remains, unlikely to be, must be the truth.

     

    So, as UPS shipped me a second board I replaced it and just connected. And it worked like a charm!

    So the road test Compute Module I/O board has some issue like a bad soldering or something incredibly small and invisible generating this problem.

     

    Instead, despite what the documentation says the Raspberry Pi Compute Module 3 has not the I2C 1.8K pull up resistors enabled by default.

     

    Enrico

     

     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to rew

    Hi Roger, I have anyway understood what you was mentioning.

     

    I forget to mention that obviously the same is working with the Pi3 board counter parts. But... Read the last post image The problem was solved replacing the CM3 I/O board.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Jan Cumps

    I agree with Jan, the pictures arent representative of an I2C clock.

     

    The video however does show an expected clock pattern whenever you run i2cdetect. The problem here is that in the video there is already some activity on that bus even when theres not any expected activity so the clock pattern in the video is just overlaying onto an existing signal. The activity that seems always present isn't expected for an i2c bus and this is interfering with the I2C clock and data that you are sending out.

     

    I notice that you have another peripheral either a camera or display connected to the board (im guessing because you have the link wires from one of the jumper headers to the other). Do you have drivers installed for a peripheral like another camera or display but just dont have that connected. In that case, those drivers will be utilizing that I2C bus already with their own signals.

     

    ---------------

    edit

     

    Ive just noticed that you solved this problem by buying a new board. Did you also start with a fresh re-install?

     

    Looking once more at the original video you posted, something else is definitely using that bus. I would say a driver for a peripheral that isnt connected.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to Former Member

    Hi Lucie,

     

    the problem has been solved at least for the side I can interact. Confirmed that there is no internal pull-up enabled on the bus adding the external resistors it worked.

    I agree with you that the bus has something that should not exist, But there is. That is weird and not easy to explain.

    Then the I/O board was the real issue - at least one of the real issues. There is a second that I have discovered just now; to make tests with the several versions of the Jessie and strech debian desktop I have prepared three different microSD cards and booted the Compute Module 3 Lite (without the eMMC) that worked fine. Now I have replaced again the origina CM3 (on the new board) and I get always the same issue, nothing is recognised at all. So it seems that the problem is on both the I/O board and the processor. As now I have two CM3 I will install again a fresh install on the other CM3 boards and see what happens.

     

    At the actual date the only configuration working is with the CM3 lite that boots from the microSD. Not the one booting from them eMMC. I have also re-estalblished the peripherals connected as in the original configuration (camera, lcd and serial, USB with keyboard, mouse and SSD) an all works fine anyway.

    Now I will check with another fresh CM3 installation with the headless raspbian distro dated july 2017 (the last released before the strech).

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to Former Member

    Update (to be definitely verified). I have set the Raspbian (same distro, full version) jessie on the SD card and CM3 Lite. Setup the board with the following peripherals (not all but almost the base)

     

    • USB: SSD + Keyboard + Mouse + WiFi
    • Pi Camera V2
    • 7" display
    • Serial PTHat controller
    • HDMI (connected but not shown when the display is on)
    • Digilent I2C capsense buttons

     

    image

     

    All work perfectly! And the i2cdetect find the capacitive device immediately. Only with the CM3 Lite boot from 8Gb microSD. Not when boot on the other CM3 + eMMC

    Next step is trying a different CM3 + eMMC

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago

    have you loaded the drivers on for the lcd?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to Former Member

    Yes Luvie, as you can see in the picture it is up and running (showing i2c detected address)

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube