I2C Performance PI4 & SAM-M8Q

Hi folks,

I’ve got a SAM-M8Q connected to a PI4 via Qwiic connectors on a PICAN-M hat. The PICAN-M doesn’t process the I2C, just connects the Qwiic pins to GPIO 2&3 on the PI. The Qwiic cable is 100mm.

The program I’m using disables NMEA, sets the GPS update to 10hz, enables NAV-PVT on the I2C port. I’m using UBX to pull NAV-PVT messages from the M8Q and I’m struggling to get above ~3 updates per second. I’ve tried different speeds for the I2C bus, 200000 seems to be the sweet spot. If I have it at 400000 I start running into i2c errors and heaps of checksum problems.

Does anyone have any recommendations on what I should be expecting from a PI4 in such a topology? Doesn’t appear to be a processing bottleneck, so wondering if there’s something basic in terms of setup I’m missing?

Thanks,

Beatty

Hi Beatty (@bldintheplacetobe ),

If you are not using UART1, disable NMEA output there too. It will help - a lot.

Best wishes,
Paul

1 Like

The SAM-M8Q should be able to do 10 Hz, although that’s pretty much top of range, and if it drops epochs you might want to easy back to something like 8 Hz.

If there are data capacity issues, you’ll see $GxTXT “rxbuf,alloc” type warnings. As @PaulZC indicates turn off NMEA, and perhaps all output to UART1, as data volume at 1 Hz is close to saturating 9600 baud.

You should enable UBX-NAV-PVT for Periodic output, ie via UBX-CFG-MSG with NAV-PVT with I2C=1 and CFG-RATE of 100ms. Polling the message is not likely to get the rate you want.

1 Like