Hi everyone,
I am using an Arduino GIGA R1 (Mbed-based) as an I2C Slave to emulate a touch IC (Address 0x01). I've encountered a severe performance bottleneck where the GIGA stretches the SCL line for exactly 500ms during a specific communication sequence.
The Context: The host (an automotive head unit) uses a Repeated Start (Sr) to transition from a Write operation to a Read operation without sending a STOP bit.
The Evidence (Logic Analyzer Capture): I have attached a screenshot which clearly shows the "crime scene":
- Phase 1 (Write): The GIGA responds normally to
Setup Write to [0x01]and receives the data byte0x04successfully. - Phase 2 (The Transition): Instead of a STOP bit, the host issues a Repeated Start (SDA goes LOW while SCL is HIGH).
- Phase 3 (The Failure): The host immediately sends the
Setup Read to [0x01]address. - The Bug: Right after the 8th bit of the Read address, the GIGA pulls SCL LOW for ~500ms before finally releasing it and providing an ACK.
Observations:
- This happens consistently on both reserved (
0x01) and standard (0x11) addresses. - The 500ms delay feels like a hard-coded Bus Timeout or a recovery mechanism within the
ArduinoCore-mbedlayer. - My code is minimal (empty
onReceiveandonRequesthandlers), yet the hardware/OS level latency remains.
My Questions:
- Is the Mbed OS I2C Slave driver known to have issues handling a "Receiver to Transmitter" role switch during a Repeated Start?
- Is there a way to increase the priority of the I2C interrupt or bypass the EventQueue to ensure the
onRequestbuffer is filled faster? - Where can I find the 500ms timeout constant in the core files to confirm if this is a driver-level reset?
This latency makes the GIGA unusable for any high-speed I2C emulation where the host expects a response within microseconds, not half a second. Any insights or workarounds would be greatly appreciated.
Thanks!

