I2C on Allwinner NanoPI Neo2

Manuel Stühn freebsdnewbie at freenet.de
Wed Apr 24 10:24:07 UTC 2019


Hi,

On my Allwinner NanoPI NEO2 (H5 aarch64 based) the I2C("allwinner,sun6i-a31-i2c" compatible, debug messages enabled) shows this message:

root at bsd-nanopi:~ # i2c -v -f /dev/iic0 -a0x3c -d r -c 1
dev: /dev/iic0, addr: 0x3c, r/w:twsi_locked_start(): no ACK (status: 08) after sending slave address r, offset: 0x00, width: 8, count: 1
ioctl: error sending start condition

while trying to communicate with the attached NanoHAT OLED (SSD1306 based I2C 0.96inch 128x64 display).

Observing the bus with a logic analyzer shows, that between start condition and the address write there is a 10ms pause. Then the address gets written correctly and 
the device answers ACK. The I2C-clock is 100kHz which is confirmed by logic analyzer.

I'm assuming that this long delay between start condition and address write causes this error, but i do not find any problem in the i2c driver(iicbus/twsi*). I've crosschecked the board with the default Linux image, and I2C works there without problems and there is no visible delay between start and addr-wr.

Any ideas?

-- 
Manuel


More information about the freebsd-arm mailing list