When using the nrf5340's iic for communication, there are non-removable delays

We have encountered a problem in using iic to communicate that the delay cannot be removed.

We are using the sample in NCS,

the address of the sample is C:\ncs\v2.6.1\modules\hal\nordic\nrfx\samples\src\nrfx_twim_twis\txrx

Then add the code for iic communication every 10ms inside the while(1) loop.

    while (1)
    {
        NRFX_LOG_INFO("Reading value of DRONE_REG_FORCE_X register:");
        register_read(DRONE_IDX, DRONE_REG_FORCE_X, (uint8_t *)&drone_ctrl_buffer, 1);
        NRFX_LOG_INFO("ctrl buff: 0x%X", drone_ctrl_buffer);
        NRFX_LOG_INFO("...");
        drone_ctrl_buffer = 0;
        NRFX_EXAMPLE_LOG_PROCESS();
        k_msleep(10);
    }

After analyzing the iic signals through a logic analyzer, I found that it is not guaranteed to communicate once every 10ms, and that after each communication, a delay of 27ms must be required before the next communication can take place.

I would like to ask how to remove or shorten the delay between two communications.

Parents Reply Children
No Data
Related