Watchdog problems: "Watchdog has expired. Target detached"

I need some assistance from the community to help me with a watchdog timeout problem I am having. I have a project that builds and runs fine when I created the project with the ESP Net+OS project defaults. Then I wanted to try to add a watchdog on the 9215, so I created a new Net+OS project with the same settings EXCEPT I checked the watchdog option.

The project runs for approximately one minute, then it halts in the debugger with the error: "Watchdog has expired. Target detached ". I tried manually disabling the watchdog by changing the #define WATCHDOG_ENABLED from TRUE to FALSE in appservices.h, cleaning and rebuilding all; but this seems to have no effect.

I am assuming that the initial watchdog reset is expected because I would need to add the code to manually kick the watchdog (??)

Anyone know why my
#define WATCHDOG_ENABLED FALSE
in appservices.h seems to have no effect? How do I disable the watchdog?

Thanks!

I left out one important detail: The watchdog was resetting because the processor is running at 1/2 speed (75 MHz). At 150, the watchdog doesn’t trip. So…

  1. Still wondering how I can disable the watchdog in the build (#define ENABLE_WATCHDOG in appservices.h isn’t doing it)

  2. I am now wondering what I need to change in the watchdog to enable it to work when running at half speed?

Hello.

I have similar problem. Also, the “Watchdog has expired. Target detached” errors appears with completely disabled watchdog timers too.

For example, in next code block

    while(1)
    {
        if ((*dialer_status) == (*prev_dialer_status))
        {
            tx_thread_sleep(sleep_ticks);
            // If the ppp state machine takes more than 30 seconds to complete dial, report error.
            if(++dialer_timeout >= 600)
            {
                result = -1;
                break;
            }
            continue;
        }
        *prev_dialer_status = *dialer_status;
    ...

this error appears after 11 calls of tx_thread_sleep(). The 12th call of this function will cause detaching from target.

Thanks!

Hello,
i can confirm, that this issue still exists. We need to fix the crash of our application running on ConnectCore 9P 9215 ARM9. According manual in C:\netos75\Documentation\white_papers\crash_debugging.pdf were able to prepare whole workplace for catch the crash.

But after running of our application in debug mode from Digi ESP NET+OS 7.5 through jlink debugger it was aborted by “Watchdog has expired. Target detached.” message vide enclosure. Same issue what is described above and debugging is useless.
Watchdog was disabled:
define WATCHDOG_ENABLED FALSE /* Watchdog timer */

Has this any solution?
Thanks.

the watchdog is a hardware timer which is resetting the hardware if you don’t reply to the watchdog in time.
It is to be expected that the hardware will reboot, if the running firmware does not reply to the watchdog in time.
The debugger can’t stop this, because typically the watchdog will reset the hardware, before the debugger can catch anything via JTAG.

If you are running an image.bin firmware from flash which is actually implementing a hardware reset after some seconds, you won’t be able to recover from this by running this firmware.

One way to recover from this, is to use the rom.bin boot loader to force the module into a TFTP/serial recovery mode, before image.bin can trigger the watchdog. Then upload a firmware build without the watchdog enabled via TFTP/serial recovery into flash, to avoid your hardware will reboot every some seconds (depending on your watchdog time).

“Watchdog has expired. Target detached” is not related to a NS9215 watchdog. It is a JTAG/GDB SW watchdog expiring, indicating catastrophic hardware failure. the error is coming from gdb:
https://android.googlesource.com/toolchain/gdb.git/+/honeycomb/gdb-6.4/gdb/remote-sds.c#891
It sounds like you have a hardware issue. If you have multiple boards swap modules with the same software between 2 boards and see if the failure follows the module or the board. This will allow you to narrow down the issue to either module’s HW or board’s HW.

It seems like you’re encountering a watchdog timeout issue in your Net+OS project. While manually disabling the watchdog might not be resolving the problem, you could consider adjusting the watchdog configuration settings to better suit your needs. You might need to ensure that the configuration changes are taking effect as intended.