I have experimented in detail with using the OpenMV camera (slave) connecting to my Arduino Uno. I use appropriate pullup resisters and all is fine if I disable interrupts. I have simple working two-way demo code that is very very reliable.
[Have built a complex auto car that uses Arduino Uno and added the camera lately to the front, so it would be a great deal of work to make the camera master on I2C. In fact the I2C communication with the OpenMV as master still requires interrupts to be disabled - I have examples that show this explicitly]
However, with interrupts disabled I cannot connect to the IDE since it (of course) cannot interrupt the running code when I request a connection
I only disable interrupts when making the I2C call, so it is mostly fine.
So long as the Arduino is playing nicely (eating the data sent from the camera and writing data whenever the camera is waiting) there is not issue with this solution.
However, I would very much like to have timeouts working on the OpenMv recv and send requests. I am afraid that they won’t be working because I have interrupts disabled. If this is the case then I have a bricked OpenMV and have to reflash it - which is a pain.
So, can you tell me:
whether the timeouts will work in pyb.I2C.recv and send when I have interrupts disabled.
(Better still) Is there a way to just disable some interrupts - so that I2C works as slave) but the IDE interrupt still works? This would be great. I am happy to mod the source and build a custom firmware.
I have downloaded the source but cannot find documentation which explains micropython code architecture . I cannot even find how the REPL dispatches code to appropriate C routines. With enough doc I may be able to help myself more