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.

RTOS/TM4C1292NCPDT: default hardware watchdog timer timeout value

Part Number: TM4C1292NCPDT


Tool/software: TI-RTOS

Hi,

what is the default hardware watchdog timer timeout value when its enabled for hardware reset? 

my system operating frequency is 120 MHz.

i am trying to change the period of WDT timeout value using Watchdog_setReload() function, but it wont get effective.

may i know the reason for this?

the below is the code snippet.

    Watchdog_Params_init(&wdtParams);
    wdtParams.callbackFxn = (Watchdog_Callback)WatchdogCallbackFxn;
    wdtParams.resetMode = Watchdog_RESET_ON;
    wdtHandle = Watchdog_open(Board_WATCHDOG0, &wdtParams);
    if (wdtHandle == NULL) {
        System_printf("Error opening Watch dog!\n");
        ISystem_flush();
     }

// this is the call used for setting the new timeout value from task context.

Watchdog_setReload(wdtHandle, vlaue);

Regards

Bala

  • Hello Bala,

    Looking at the datasheet, it looks like the default value for the watchdog timer will be 0xFFFF.FFFF.

    Regarding the watchdog issue, can you review what Todd did in this post and see if that is applicable to your project as well? e2e.ti.com/.../2405757
  • Hello Ralph,

    Thank you for the reply.

    Ralph Jacobi said:
    Looking at the datasheet, it looks like the default value for the watchdog timer will be 0xFFFF.FFFF

    my system is running in 120MHz frequency. so the timeout should be ~35 seconds... but its not actually. the timeout happening within second it seems.

    Regards

    Bala

  • Hello Bala,

    I saw a few E2E posts speak of 1 second timeout but couldn't find anything in the datasheet to corroborate that. It may be a TivaWare setting which sets it to 1 second, but I couldn't track down a clear spot that occurs. The other possibility is a ROM setting though reviewing for that would take a long time and I don't think it would offer you value in solving your problem.

    Details on the default aside, did you get to review the post I linked?
  • Hi Ralph Jacobi,

    i have gone through the post mentioned and i have few clarification regarding that.

    1. Will HW WDT callback function invoked when CPU hang/executing some infinite loop?

    2. My requirement is Device need to be reset when HW WDT timeout happen. as per the e2e thread, it has to execute call back function to change the WDT timeout period and one of the WDT parameter should be RESET_OFF. Then when it will be set to reset when WDT timeout with new reload value?

    Regards
    Bala
  • The default watchdog timeout for the Watchdog driver is specfied by the .reloadValue field in the Watchdog_HWAttrs structure (in your EK*.c file).

    const WatchdogTiva_HWAttrs watchdogTivaHWAttrs[EK_TM4C129EXL_WATCHDOGCOUNT] = {

       {

           .baseAddr = WATCHDOG0_BASE,

           .intNum = INT_WATCHDOG,

           .intPriority = (~0),

           .reloadValue = 80000000 // 1 second period at default 80MHz clock freq

       },

    };

    The default in most of the product files in 80,000,000.  You can change this default or you can change the period with Watchdog_setReload().

       Watchdog_setReload(watchdogHandle, 240000000);

    If you want the watchdog to reset your device (instead of calling a callback), you should open the watchdog like this:

       /* Create and enable a Watchdog with resets disabled */

       Watchdog_Params_init(&params);

       params.resetMode = Watchdog_RESET_ON;

       watchdogHandle = Watchdog_open(Board_WATCHDOG0, &params);

       if (watchdogHandle == NULL) {

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

       }

    This will cause the watchdog to reset the device when the watchdog expires.