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

nrf_twi_mngr_schedule error handler

Hi,

 When  nrf_twi_mngr_schedule returns error as NRF_ERROR_NO_MEM what are best practices to handle that error. Do I re-schedule another transaction or is there a more robust method to handle TWI schedule errors. 

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Ftwi_transaction_mgr_example.html

Thanks

Parents
  • Hi,

    You can increase the size of the queue if that is the problem. If so, adjust the NRF_TWI_MNGR_DEF parameters to increase the maximum number of pending transactions. In any case though it makes sense to handle the case where the queue is full, and an often sensible way to handle this is to re-schedule the transaction when there is room available in the queue. Exactly what makes sense is application specific, though (perhaps some transactions could be skipped without causing problems in some applications, etc.).

Reply
  • Hi,

    You can increase the size of the queue if that is the problem. If so, adjust the NRF_TWI_MNGR_DEF parameters to increase the maximum number of pending transactions. In any case though it makes sense to handle the case where the queue is full, and an often sensible way to handle this is to re-schedule the transaction when there is room available in the queue. Exactly what makes sense is application specific, though (perhaps some transactions could be skipped without causing problems in some applications, etc.).

Children
Related