How to use I2C receive continue in Zephyr without restarting the transaction (without another start bit)?

I was trying to receive some data using "i2c_transfer" then continue the receiving without starting a new transaction. 

Stop bit was sent if I configured to use it or not. and if I try to continue the receiving the start bit and slave address will be sent again and start a new transaction.

Is there any API I can use to continue the receiving without starting a new transaction?

Parents
  • Hi Abdelrahman, 
    In theory if you set the flag I2C_MSG_STOP it should therefore set the flag NRFX_TWIM_FLAG_TX_NO_STOP in nrfx_twim driver. Then instead of connecting the SHORT LAST_TX to STOP task, it will connect the shot LAST_TX to SUSPEND task instead. 
    Could you show how you do it in the code ? Maybe provide us a simple application so we can try to reproduce the issue here. 
    Another option is to use nrfx driver directly, the samples can be found in \modules\hal\nordic\nrfx\samples\src\nrfx_twim_twis

Reply
  • Hi Abdelrahman, 
    In theory if you set the flag I2C_MSG_STOP it should therefore set the flag NRFX_TWIM_FLAG_TX_NO_STOP in nrfx_twim driver. Then instead of connecting the SHORT LAST_TX to STOP task, it will connect the shot LAST_TX to SUSPEND task instead. 
    Could you show how you do it in the code ? Maybe provide us a simple application so we can try to reproduce the issue here. 
    Another option is to use nrfx driver directly, the samples can be found in \modules\hal\nordic\nrfx\samples\src\nrfx_twim_twis

Children
Related