[TangerineSDR] Odroid N2 & C4 I2C device addresses

David Witten wittend at wwrinc.com
Sun Aug 23 13:36:21 EDT 2020


All,

For anyone using Raspberry-Pi  like single board computers with the
magnetometer support boards, please understand that while the addresses of
I2C devices *within a bus *are hardware-defined*, *the bus *numbers* (and
therefore the bus device node names that appear in the /dev folder) are set
by the manufacturer and vary, often between Linux versions.

For this project, we are generally using the lowest numbered USER I2C bus,
(eg. /dev/i2c-1).

Whereas earlier versions of of the Odroid N2 exposed /dev/i2c-2 and
/dev/i2c-3, recent releases of the Ubuntu distribution provided for the
Odroid N2+ (and I believe the C4) map these devices to /dev/i2c-0 and
/dev/i2c-1.

Please READ:  ODROID-N2/C4 I2C Controller(Device Node) Information
<https://wiki.odroid.com/odroid-n2/application_note/gpio/i2c#ubuntu_1804_or_lower>

Raspberry Pi's seem to expose /dev/i2c-1 and /dev/i2c-2.  Some SBC's expose
as many  as eight I2C busses, in my experience. Also note that this and
other related information is configured by the Linux 'device tree database'
(DTB).

Another important variable that is set in the DTB is the 'bus speed' or
data rate.  The specifications for the project stipulate the use of the
lowest standard data rate for the I2C interactions, 100 kbps.

Many SBC's these days default the data rate of one or more of their
available I2C busses to another rate, often 400 kbps.  On the Odroids the
lower numbered bus usually seems to default to 400 kbps and the higher
numbered one defaults to 100 kbps.

The document referenced above shows how to change the data rate on a bus.
These changes only persist until the next reboot.  To make them permanent,
one must install the device-tree-compiler package with apt or apt-get.  You
then edit DTB using those tools to make changes that will persist across
system resets.

We currently do not know whether the default speed of a given bus impacts
the operation or reliability of the magnetometry data collection.

Dave Witten, KD0EAG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/tangerinesdr_lists.tapr.org/attachments/20200823/fc286279/attachment.html>


More information about the TangerineSDR mailing list