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

TWI recover from timeout

I am using the TWI module in master mode, with sdk 10. I purposely create an error situation, in which the TWI gets stuck and keeps returning NRF_ERROR_BUSY every time I try to initiate a transfer. How may the device recover from this block? I have tried uninit/init the TWI module, with no success.

Parents
  • The struct twi_control_block_t in SDK 10 differs from the one in SDK11. Your answer implies the use of the SDK11 struct, as there is no such field as busy in SDK10 twi_control_block_t. The available fields are:

    • state
    • substate
    • transfer_in_progress
    • transfer

    Could the solution be related to setting transfer_in_progress to false?

Reply
  • The struct twi_control_block_t in SDK 10 differs from the one in SDK11. Your answer implies the use of the SDK11 struct, as there is no such field as busy in SDK10 twi_control_block_t. The available fields are:

    • state
    • substate
    • transfer_in_progress
    • transfer

    Could the solution be related to setting transfer_in_progress to false?

Children
No Data