Application is communicating with a touch controller (FT5336) over I2C and registering a callback with kscan_config() and kscan_enable_callback(). Every few minutes a "ZEPHYR FATAL ERROR 0: CPU exception on CPU 0" (Fault during interrupt handling) occurs, restarting the application. Using debug I can see two "<signal handler called>" (photo'd) and I always see a call to "i2c_dump_msgs()" as the lowest call.
J-Link output:
Debug:
Device tree:
I'm suspicious of the issue being related to my kscan callback because:
- It is the only interrupt off of I2C
- Commenting out registration of the callback avoids the error
I've read similar posts that say this issue arises when an interrupt interrupts an interrupt - Am I understanding that correctly? If so, shouldn't interrupt priorities avoid this? Where/how is this managed? Also worth noting this application uses bluetooth soft device, timers (rtc2), uart, pwm, etc.
Other info:
Zephyr: 3.1.99-ncs1
nRF Connect SDK: 2.1.0
nRF Connect for Desktop: 3.12.0
Development Platform: Windows
Board: Custom
Edit:
Not sure if it's related by occasionally see "<err> i2c_nrfx_twim: Error on I2C line occurred for message 0" in my application at roughly the same frequency, although I do not see this at the same time as the CPU fault.