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.

TIRTOS 2.10 to 2.12 WATCHDOG Change

Other Parts Discussed in Thread: TM4C129ENCPDT

Running latest CCSV6.1 on Windows 8.1 with latest TIRTOS 2.12, converting a TIRTOS 2.10 project

My question: "What has changed in the TIRTOS version 2.12 regarding the watchdog initialisation."

The migration document mentions the IO but nothing to do with the watchdog.

The following code used to work

Watchdog_Params_init(&wdogParams);

wdogParams.callbackFxn = Watchdog_CallbackFn;

wdogParams.resetMode = Watchdog_RESET_ON;

watchdog = Watchdog_open(Watchdog_CallbackFn, &wdogParams);

if (watchdog == NULL)

{

System_abort("Error opening Watchdog!\n");

}

I noticed that Watchdog)open had different parameters and changed my call to

 

Watchdog_Params_init(&wdogParams);

wdogParams.callbackFxn = Watchdog_CallbackFn;

wdogParams.resetMode = Watchdog_RESET_ON;

watchdog = Watchdog_open(0, &wdogParams);

if (watchdog == NULL)

{

System_abort("Error opening Watchdog!\n");

}

Now the code causes my TM4C129ENCPDT processor to lock the debug port and no longer operate so I have to go to LMFlash programmer to try and recover the board and try again.  I have googled lots but there is no complete documentation which shows what has changed, and how I should now setup the watchdog like there is for the generic IO.  There are also no examples that demonstrate the watchdog?

  • HI Barry,

    I compared the Watchdog code in TI-RTOS for TivaC 2.10.01.38 and TI-RTOS for TivaC 2.12.01.33.

    I don't see any change in the Watchdog_open() parameters (left image: 2.10 and right image: 2.12). I am not sure about Watchdog_Callbackfn parameter in your code above.

    But I do see some changes in the watchdogTivaHWAttrs array in "board" c file (left image: 2.10 and right image: 2.12). This is documented in the TI-RTOS 2.12 migration docs

    This probably is what's causing the issue as I see the priority being used in WatchdogTiva.c Watchdog_open() implementation (left image: 2.10 and right image: 2.12):

    Vikram

  • Hello Vikram

    Thanks for your response. 

    As it usually happens, I found this out myself late yesterday, about an hour after posting the question.

    The biggest issue this caused me was that by not having the IntPriority in my table, the first time I called watchdog_open for watchdog0 the result was a total lockout of the JTAG port, so the debugger appeared to completely fail. 

    It is a pity the change wasn't done in a way that would generate a compiler warning or error so you are aware of what has caused the issue, rather than suffering a total failure of the debugging and having no idea why. At the very least I would have expected some sort of sanity check added into the open function in case the priority wasn't set correctly.  The error being silent means you don't know you have a problem till your code simply stops working.

    I have now managed to unlock the JTAG on one of my boards using LM Flash Programmer (Other board refuses to unlock, not sure why).

  • I have filed a bug report to add sanity check:

    cqweb.ext.ti.com/.../main;service=CQ&schema=SDO-Web&contextid=SDOWP&entityID=SDOCM00116879&entityDefName=IncidentReport&username=readonly&password=readonly