xmx i2c - TheTechnobear/SSP GitHub Wiki

I2C on the XMX

note: this will be enable when image is updated for USB audio support.

IMPORTANT NOTE - proceed totally at your OWN RISK.

connecting I2C can EASILY damage XMX SSP beyond repair ! the pins can only take 3.3v, if you put in > 3.5v you will FRY it.

using I2C would not be covered by warranty...

the expansion port is supplied for use by developers it is not intended to be used by end-users directly.

IMPORTANT NOTE 2: I take no responsibility for this info - it's your OWN RISK

Im just a user... and also take no responsibility for this info, nor have i tried this on the XMX.

sorry, for glaring warnings... but the XMX is an expensive instrument to damage. you need to really think hard about if you want to take the risk... and you need to be (very) experienced to even consider it.

please note id also recommend reading my article on i2c for the SSP, as it contains additional information that is relevatnt to the XMX see I2C on the SSP


using I2C bus

The XMX has 2 i2c buses available, i2c-2 and i2c-3

again before we proceed, Ive not actually used this i2c link yet... I just know the details, and can see its enabled.

you can see its enabled here:

i2cdetect  -l

you will see it.. i2c2 and i2c3 (do not use other i2c channels they are used 'internally')

below you can see the connector and the schematics for the expansion port

Connection

VOLTAGE: you need to use 3.3v ONLY be very careful, MANY i2c buses are 5 volt this will damage your XMX.

LEADER/FOLLOWER aka MASTER/SLAVE: the XMX is expected to be the I2C leader (aka master), this means you should only connect i2c followers (aka slave)

becareful here, if your other device contains an MCU it likely wants to be leader too!

SCL/SDL: you will note on the schematic there is already a PULL UP resistor.

VOLTAGE SUPPLY: there is no voltage supply on the xmx expansion connector. this means you will need to supply your own to the connected device. and ensure its is not using > 3.3v on the I2C lines.

note: this is a low level interface, it is NOT designed for 'users' to mess with. the I2C pins interface directly to the SoC/CPU... without protection, so its easy to cause damage.

Software

there is currently no 'support' for I2C in software, this means you would need to write a 'module' to access the I2C data, and decide what it should do - this should not be too tricky (assuming you are a developer).

whilst it'd be possible to have a generic i2c module for something simple (e.g controllers). but for many, more complex modules that you'd connect via i2c would need specific code, that would code the 'protocol' the module uses over i2c.


Other information.

on I2C on the SSP I discuss ideas and complications about using I2C on the SSP, that are also very relevant to the XMX - please read ;)

also, as of today, I have not tested the above on the XMX, so cannot verify its correctness. (esp. as of this writing i2c is not enabled in the device tree)