This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC2640R2F: Debugging is not working when watchdog is enabled

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hi team,

We have peripheral project and using Simplelink cc2640r2_sdk_1_35_00_33. compiler is CCS7.2

We have enabled the watchdog timer, after enabling watchdog debug is not working, even we tried by enabling debug_stall mode, we are not able to debug.

Once we start debug session it will start as expected it will hit to main, but after hitting RUN, it will stop in middle showing error like this -

Cortex_M3_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.628.3)
Cortex_M3_0: Failed to remove the debug state from the target before disconnecting.  There may still be breakpoint op-codes embedded in program memory.  It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

If we disable watchdog, debug will work without any error.

Already its posted to BLE forum and we didnt receive any replies.

Expecting urgent reply on this issue

Regards

Suganya

  • Hi Suganya,

    This is not a bug, but rather because a watchdog reset will set the processor in halt in boot (HIB, see TRM chapter 5.6).

    I would suggest that you:

    1) Don't make use of the watchdog while you have to be in debug mode

    2) Use other ways of debugging (uart, blinking leds, etc) when the watchdog is being used.

    Regards,

    Klas

  • Hi Klas,

    Thanks for your reply.

    But it should work with watchdog enabled also.

    Thats why we have Watchdog_DEBUG_STALL_ON in our code also.

    Other projects running same CC2640R2F dont face such problems.

    We are clearing watchdog whenever my application task runs (inside for loop) and also inside standbypolicy (whenever device goes to standby policy)

    This should be sufficient to clear the watchdog timer.

    But still debugging doesnt work at our end. Only if i comment out WDT_watchdogTimerOpen(), debugging works in my project

    - Suganya