I2C clock stretching nRF54L / Zephyr

This is nRF54L10 with Zephyr, SDK & toolchain both v3.02 on a custom board.

I am investigating I2C crashing on the 54L10. This happens during writing data to a MAX41462 radio IC via 12c, this involves writing a packet of 25 bytes @10kbps. I am sending a burst of 5 packets at 100ms spacing, repeated every second as a test.

The transmit routine runs in a work queue. I use the following code to write:

rc = i2c_reg_write_byte(i2c_dev, I2C_ADDR,REG_ADDR, data);

The MAX41462 has a 4 byte FIFO buffer and implements flow control by I2C clock stretching which seems to be causing the crash - using a logic analyser I can see the clock signal being held low after 8 bits of data transfer. So are there any tricks techniques or tweaks or caveats when using I2C clock stretching peripherals?

(Note I do realise that my problem could lie with the peripheral IC latching, but I need to understand how nRF/Zephyr handles things to get a holistic view of the situation)

Incidentally the MAX41462 requires SDA to be toggled after power up. Is it OK to configure the line as a GPIO output and toggle before running i2c_configure() ?

Parents Reply Children
No Data
Related