Random Hang in field - JTAG Question
Posted: Fri Feb 10, 2023 5:18 pm
Hi,
We have an ESP-IDF based ESP32 project with several thousand units in the field. On very rare occasions we see a system hang totally. We know it is hung because of various status LEDs that quit changing. This is incredibly rare. We see it once or twice a week out of several thousand systems. It would be far superior if the device would reboot instead of hanging.
I have attempted to utilize multiple watchdog timers. We currently are using both the Task Watchdog and the Interrupt Watchdog. I have included most of my major tasks in the Task Watchdog. I even created code to also include the RTC Watchdog. All of these watchdogs appear to work properly except for this very rare hang in the field.
I started wondering if perhaps the system somehow thought a JTAG debugger was attached which would cause it to disable all of the watchdogs. We do have a JTAG interface, but of course it would not be active in the field.
I was attempting to determine how ESP-IDF determines that a debugger is attached. Eventually I came to the function
But all it does is call an assembly RER instruction of a register called DSRSET. I have been unable to find any documentation for this register or what the meaning of the bit that is set in it might be.
Can anyone tell me how this register works or where it is documented?
Thanks,
Don
We have an ESP-IDF based ESP32 project with several thousand units in the field. On very rare occasions we see a system hang totally. We know it is hung because of various status LEDs that quit changing. This is incredibly rare. We see it once or twice a week out of several thousand systems. It would be far superior if the device would reboot instead of hanging.
I have attempted to utilize multiple watchdog timers. We currently are using both the Task Watchdog and the Interrupt Watchdog. I have included most of my major tasks in the Task Watchdog. I even created code to also include the RTC Watchdog. All of these watchdogs appear to work properly except for this very rare hang in the field.
I started wondering if perhaps the system somehow thought a JTAG debugger was attached which would cause it to disable all of the watchdogs. We do have a JTAG interface, but of course it would not be active in the field.
I was attempting to determine how ESP-IDF determines that a debugger is attached. Eventually I came to the function
Code: Select all
cpu_ll_is_debugger_attached()
Can anyone tell me how this register works or where it is documented?
Thanks,
Don