Open
Description
how to reproduce:
- connect any port IO to GND (like A0)
- issue any command that uses this io as i2c initiator SCL (like "glasgow run i2c-initiator --port A -V 3.3 scan")
- glasgow is waiting endlessly for SCL to go high
I suggest to add a generous, but still reasonable timeout (like 1 second) for this case. Also return an explicit error message like "timeout, SCL stuck low" or similar.
I think this kind of error is not uncommon when testing or developing. Cases that come to mind are:
- wrong IO pin selected
- flaky connection
- external pullup resistors not connected or forgotten to enable the internal ones
- DUT misbehaving
It would be nice to add some similar detection for SDA too, currently you get back all zeros.