This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2C can't transfer more than 2 bytes

Hi,

I am using "TWI Sensor" example(SDK v17.0.2) as reference in our application. For multiple bytes transmission this is how I defined in "nrf_drv_twi_tx".

    ret_code_t err_code;

    /* Writing to LM75B_REG_CONF "0" set temperature sensor in NORMAL mode. */
    uint8_t reg[] = {'H', 'E', 'L', 'L', 'O'};
    err_code = nrf_drv_twi_tx(&m_twi, ARDUINO_CHIP_ID, reg, sizeof(reg), false);
    APP_ERROR_CHECK(err_code);
    while (m_xfer_done == false);

Here is how the output data on the protocol analyser, first transaction contains all 5-bytes but the remaining transaction contains only the first two bytes.

Am I missing something here? Any suggestions would be great.

Regards

Siva

Related