TWIM troubles on nRF54L15

I'm having trouble getting the I2C interface working on our nRF54L15-based prototypes. The initial config write to the device fails; specifically, in the twim driver (i2c_nrfx_twim.c) the i2c_nrfx_twim_msg_transfer() call succeeds, but the sem_take for the completion sync semaphore times out. The event_handler function is never called.

I looked through similar tickets on devzone, including 337878, 

I checked for pin conflicts with other peripherals, and tried i2c20, i2c21, and i2c22 with the same result.

I checked for shorts on the board, and tried multiple proto boards.

I don't have a logic analyzer, but I can get one if necessary.

We're using a custom driver for the sensor, but it works fine for our nRF52833-based product. The relevant difference in the DTS files is changing the peripheral from i2c0 to i2c20, and changing the compatible line from "nordic,nrf-twi" to "nordic,nrf-twim". The nRF52833-based product only seems to work with nrf-twi, not nrf-twim.

Is there something I need to do to enable the DMA access, or other prerequisites for TWIM on 54L15? I could not find an example of nrf-twim use in the samples directory.

DTS snippet and schematic sections below.

Thanks,

Chris.

-------------------------------

&pinctrl {
    /omit-if-no-ref/ i2c0_default: i2c0_default {
        group1 {
            psels = <NRF_PSEL(TWIM_SDA, 2, 0)>,
                    <NRF_PSEL(TWIM_SCL, 2, 1)>;
                };
    };

    /omit-if-no-ref/ i2c0_sleep: i2c0_sleep {
        group1 {
            psels = <NRF_PSEL(TWIM_SDA, 2, 0)>,
                    <NRF_PSEL(TWIM_SCL, 2, 1)>;
            low-power-enable;
        };
    };
};

i2c20: &i2c20 {
    compatible = "nordic,nrf-twim";
    status = "okay";
    pinctrl-0 = <&i2c0_default>;
    pinctrl-1 = <&i2c0_sleep>;
    pinctrl-names = "default", "sleep";

    as6200c: as6200c@49 {
        compatible = "ams,as6200";
        reg = <0x49>;
        label = "AS6200";
    };
};

Parents
  • Hello,

    The first I would recommend it to connect a logic analyzer trace to compare the data written on the i2c bus.

    It concerns me that you are not able to make this work on the nRF52833 with twim vs. twi, so I would recommend to start there.

    Edit: That said, you should try to enable constant latency mode during the i2c transfer to see how that impact the transfer.

    Kenneth

Reply
  • Hello,

    The first I would recommend it to connect a logic analyzer trace to compare the data written on the i2c bus.

    It concerns me that you are not able to make this work on the nRF52833 with twim vs. twi, so I would recommend to start there.

    Edit: That said, you should try to enable constant latency mode during the i2c transfer to see how that impact the transfer.

    Kenneth

Children
Related