TCA Multiplexer can permanently lock the I2C Bus #104
Labels
bug
Something isn't working
cube killer
Bugs that might cause loss of mission for a CubeSat
Understood
Tag for bugs that have been solved!
If the following scenario occurs, it is possible that the I2C bus can become permanently locked, causing the code to hang indefinitely without actually crashing or rebooting:
How to reproduce
Sequence of events
pysquared.py
. Despite the device not physically existing at the specified address, the initialization of theTCA9548A
succeeds.TCA9548A_Channel#try_lock
is called (which is correct).Potential Solution
This may also be an issue for other hardware devices. Ideally, the device drivers should not get to the point of being successfully initialized if the device itself is unreachable at its address. One possible way of fixing this potential issue is by checking the I2C addresses where a device is meant to be before attempting to initialize the device. Another possibility is modifying the device driver to check this itself before doing anything else, and especially before entering any loops.
The text was updated successfully, but these errors were encountered: