External I²C
The Nagami SoM includes a single JST-SH 5-Pin connector for expanding functionality via I²C peripherals. It is wired to TWI3, which is exposed as i2c-1 in Linux (assuming both TWI2 and TWI3 are enabled). Additionally, the connector provides an optional interrupt line (PE10) on pin 5, intended for use by kernel drivers when required.
Connector Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | 3.3V | Power supply (3.3V) |
| 3 | SDA | I²C Data (TWI3_SDA) |
| 4 | SCL | I²C Clock (TWI3_SCL) |
| 5 | INT | Optional interrupt line (PE10) |
Checking for Connected Devices
To scan for devices on the I²C bus (TWI3 → i2c-1):
i2cdetect -y 1
Detected devices will appear as hexadecimal addresses in the matrix.
Reading from a Device
To read a byte from a specific register:
i2cget -y 1 <device-address> <register-address>
Writing to a Device
To write a byte to a specific register:
i2cset -y 1 <device-address> <register-address> <data>
Interrupt Line (Optional)
Pin 5 of the external I²C connector is wired to PE10, and can be used as an optional interrupt by kernel modules that require it. If your device tree or driver supports IRQs, make sure PE10 is configured accordingly.