-
I am seeing an I2C timeout when making a series of I2C requests to collect the voltage and current from INA237 current sensors. Whenever the timeout occurs, it stalls the transfer for 29 to 30 milliseconds which is an issue with a 100ms update loop and around 24 I2C transactions during this time. The SDA line is high and the SCL line is low. I added a resistor between the ESP32-S3 and the INA237 it proved that the ESP32-S3 is holding the SCL line low. I added debug messages to i2c_esp32_transmit, and the delay is when waiting for the ISR to give the zephyr/drivers/i2c/i2c_esp32.c Line 325 in a6adaed I added delay checks to zephyr/drivers/i2c/i2c_esp32.c Line 670 in a6adaed Key question is does the 30ms delay match anything in the HAL code? That might provide a clue as to where the issue is located. I have been unable to find it after spending several hours looking through the code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
@sylvioalves Could you please comment on this when you are back in the office on Monday? Cheers, |
Beta Was this translation helpful? Give feedback.
Disabling CONFIG_TRACING_SYNC=y has resolved the 30ms delays and I have had zero I2C (in addition to Modbus and USB) failures after an overnight test run.