What is the best method for attempting to recover from a stuck TWI bus after init?
I am currently initializing the TWI instance with .clear_bus_init=true but this only happens once during the init.
For example in the past we have had some issues with EMI inducing signals on the TWI bus which caused some devices to hold the bus in a read operation. In the past we used a 'General Call Reset' after a specific number of read failures.
So again I ask my question What is the best method for attempting to recover from a stuck TWI bus after init? using the SDK.
I discussed this with the developers and their recommendation was to reinitialize the TWI driver.
However, there is an internal twi_clear_busfunction in nrf_drv_twi.c that you could expose and use, but I would recommend the first solution, i.e. reinitialization of the driver.
Thanks for talking with the developers on this. I had come to the same conclusion but I wanted to make sure that I wasn't missing something.
As always the support at Nordic is awesome!
No problem and thanks :)