Tool/software: TI-RTOS
I'm working on some firmware that coalesces data from several I2C sources and moves it up to the cloud. What I have noticed is when I2C is used in blocking mode if the device fails to respond the firmware blocks forever. I consider this poor behavior as I would rather execution continue, the failure marked and relayed to the user. I've also noticed that I2C does not seem to have a timeout mechanism. I very well could be wrong on these facts, correct me if I am.
My halfway workable solution assuming the above is to do I2C in callback mode. If callbacks fail to happen in a certain time, sound the alarms. However I am led to wonder how to recover from this. My best guess is close the driver and restart it but I'm not sure what happens to pending operations on close. Can anyone shed some light on what memory might still be active or if this is a safe operation? If I can kill the driver, mark that chip as dead and restart the driver polling the rest I can recover to a hobbled state.
In callback I guess it's not paramount that the I2C driver be able to recover without a power reset. When it dies, I could just let it stay dead but I'm looking for all my options.
Thanks for your help