Description
Description
- Type: Bug/Question
- Related issue: nRFx: Use us ticker for I2C timeout #5187
- Priority: Major
Bug
Target
TARBGET_MCU_NRF52832
TARGET_NRF5
Toolchain:
GCC_ARM
I'm experiencing an issue where after some time of running, my application begins to run extremely slowly. Button presses that should take 3 seconds take 20 seconds to register.
I believe I narrowed this issue down to a few lines of code in the i2c_api.c here:
mbed-os/targets/TARGET_NORDIC/TARGET_NRF5/i2c_api.c
Lines 55 to 61 in 1079767
This was updated in pull request #5187
When the issue happens, a logic analyzer shows the I2C transactions having 1 second delays between them. Since my application uses blocking I2C reads, this slows that thread down dramatically, sometimes causing watchdog resets.
Can anyone elaborate what would cause this I2C to get stuck in a timeout like this? And why is the default timeout 1 second? That seems extremely long for any real time system.
Related question:
https://os.mbed.com/questions/80258/App-Slowdown/