Hi,
I'm communicate with my sensor by using TWI ( i2c) driver. Most of the time, no problem.
But yesterday , i was debugging, and and ble disconnect event happen ( it print in the console). After that, i was surprised to see that my programmin were stuck somewhere.
It was in this communication sensor function where i'm waiting for transfert to be complete :
m_xfer_done = false;
err_code = nrf_drv_twi_tx(&m_twi, slaveAddr, &cmd, 4, REPEAT_START_CONDITION);
APP_ERROR_CHECK(err_code);
while (m_xfer_done == false);
I don't know why the transfert didn't fully finished, but i need a way to not stay stuck here. Is there handler or timeout mecanism to use may be to avoid this issue please with TWI module ?
Thank you !


