Hi all,
I've been working with the I2C code posted above with Hyon - and I can see why it got left!
As mentioned the main problems seem to be around arming - communications are fine until the ESC32 arms and starts to go through the states. It looks like the I2C interrupt takes too long waiting on runNewInput() and doesn't catch I2C events occurring in the meantime.
I've modified the code a bit to catch certain interrupts, but otherwise it seems I've got two situations:
- With I2C clock stretching enabled (default), after arming the ESC32 appears to hold the SCL line low, stopping any other communications coming through.
- With it clock stretching disabled, the ESC32 appears to operate fine (going armed -> stopped -> starting -> running), but whenever a message or event is recognised to be missed, the ESC32 changes back to ESC_STATE_STOPPED and repeats.
Do any of these problems ring a bell with anyone? In particular, if there's a way to be calling runNewInput() without missing I2C events (or freezing the bus), I would be very happy to know!
Thanks in advance for any help,
Sam