PinMuxing P9_21 and P9_23 to I2C2?

77 views
Skip to first unread message

cw.e...@gmail.com

unread,
Mar 22, 2016, 11:05:59 AM3/22/16
to BeagleBoard

As stated in the topic's subject, I am currently trying to expose I2C2 (The I2C bus that's normally connected to P9_19, P9_20) to pins P9_21 and P9_22. Since the documentation for the Beaglebone Black/Green show that pins 21 and 22 can be used for I2C2 it must be possible, I just can't find a solid way to do it.

Background Info

Hardware: Seeed BeagleBone Green
OS: debian
uname -a: Linux beaglebone 3.8.13-bone71.1 #1 SMP Wed May 20 20:13:27 PDT 2015 armv7l GNU/Linux
(Note that I am willing to flash whatever OS/kernel version it takes to get this working)

The requirement comes from an error I made not knowing about the default I2C device tree settings for the device. Since there were two pairs of I2C2 pins listed in the documentation, I chose the pair that lad less overlap, which was a mistake. I have since then fixed the error in my schematic/board but I already have demo PCBs on the way from the fabhouse. It'd be great to just expose those pins to the I2C bus rather than cut and rewire traces manually. Sadly due to the time constraints for the project (Deadline is on the 31st) I cannot send out for an updated PCB.

The software side of this project is based on the Adafruit_BBIO library which is, in turn, based on the python smbus library. There's very little in terms of configuration when setting up I2C communication with those libraries so the magic switch is most likely not there.

Main Methods Attempted

For all cases, assume that the UART2 device tree overlay has been disabled via blacklisting in uEnv.txt and a reboot.

  • bonescript pinMode() - Does nothing to the mode of the pin in this case although getPinMode() does show that I2C2_SDA/SCL is a possible mode option.
  • Mucked around with the Universal Cape overlay but it never really seemed to change any pin states in this case.

Summary

Given any possible (supported) OS, how can I get pins P9_21 and P9_22 into the correct pin mode to mux to the I2C2 device?
And is it possible to have I2C2 exposed on both P9_19,20 and P9_21,22?

Lastly, I apologize for any confusing nomenclature. I've been flashing different OS versions and reading documentation relevant to differing flavors of debian trying to solve this that I'm a bit number-dizzy.

Thanks for your time!

Graham

unread,
Mar 22, 2016, 11:24:00 PM3/22/16
to BeagleBoard
If you understand device trees, you should be able to turn off I2C2 on p9-19 and P9-20 and enable on P9-21 and P9-22 (as Mode 4).  I doubt that you can route the I2C2 out to two separate pin-outs at the same time.

If you don't understand how to make all of that work, then I would put some very short jumper wires from P9-19 to the next pin, which is P9-21 and another short jumper from P9-20 to P9-22. I2C2 is enabled and live by default on Pins P9-19 and -20 on the current 8.3 releases.  If you don't know how to turn off P9-21 and P9-22 for the jumper solution, cut the connector pins off going from the cape to the main BBB board.  Spend the rest of the time between now and the 31st finishing the rest of the project.  You probably have other problems that you don't even know you have, yet.

--- Graham

==
Message has been deleted

Christopher Earley

unread,
Mar 23, 2016, 4:13:35 AM3/23/16
to BeagleBoard
That bit about only being able to mux a specific mode's signal (e.g. I2C2_SDA or I2C2_SCL) to one pin at a time is the clincher. I didn't feel it vital to state in my intro post but turning off the default I2C2 bus pins would mean losing the Seeed I2C2 Grove connector (which is connected to P9-19 and 20) on the BeagleBone Green. Since that port is also in use for my demos, a software solution is just not in the cards for working around my poor design decision.

I'll brush up on my PCB rework skills as you discussed and push forward with the intent to come back to learning about the BeagleBone's device tree system at a later date.

Thanks for your help, Graham and wish me luck!

Graham Haddock

unread,
Mar 23, 2016, 8:56:03 AM3/23/16
to BeagleBoard
PCB rework skills are very useful, and not explicitly taught in college.
Good luck with your project.
--- Graham

==

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/rjWUlnwe8n8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages