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/MSP432P401R: Can't set watchdog timeout

Part Number: MSP432P401R

Tool/software: TI-RTOS

Starting with the watchdog example, I am trying to set the timeout. But calling Watchdog_convertMsToTicks() (return 0) and Watchdog_setReload() (return -3) both return as being unsupported by the MSP432.

So, how do I change the watchdog timeout?

Thanks.

  • Hello,

    Let me give this a try and I'll get back to you. By the way, which version of the SDK are you using??

    Thanks,

    David
  • I am using SDK version 1.30.00.40, but just now checked and see that there is a new version. I signed up for updates, but never received an email.
  • Hello,

    Currently those API are not supported for the MSP432.

    /*
     *  ======== WatchdogMSP432_setReload ========
     */
    int_fast16_t WatchdogMSP432_setReload(Watchdog_Handle handle, uint32_t value)
    {
        /* Not supported for MSP432 */
        DebugP_assert(false);
        return (Watchdog_STATUS_UNSUPPORTED);
    }
    
    /*
     *  ======== WatchdogMSP432_convertMsToTicks ========
     */
    uint32_t WatchdogMSP432_convertMsToTicks(uint32_t milliseconds)
    {
        /* Not supported for MSP432 */
        return (0);
    }

    Hopefully they will get implemented in the near future.

     Best regards,

       David

  • Since it can't be set, what is the default timeout time?

    Say I have a loop that gets executed every 5 seconds that could potential get stuck for whatever reason. So I would like to setup a 10-second watchdog timer. How would I accomplish this, or is that not possible for now?

    Thanks.
  • Hello,

     Yes this is possible and there are a few ways to accomplish this.

    The easiest way it to change the  .clockDivider in watchdogMSP432HWAttrs from WDT_A_CLOCKDIVIDER_8192K to WDT_A_CLOCKDIVIDER_128M.

    const WatchdogMSP432_HWAttrs
        watchdogMSP432HWAttrs[MSP_EXP432P401R_WATCHDOGCOUNT] = {
        {
            .baseAddr = WDT_A_BASE,
            .intNum = INT_WDT_A,
            .intPriority = (~0),
            .clockSource = WDT_A_CLOCKSOURCE_SMCLK,
            .clockDivider = WDT_A_CLOCKDIVIDER_128M
        }
    };

    That should give a ~11 seconds timer, please see the table below.

    Another way is to change the clock source speed (ex. from12MHz to 6MHz) or changing the clock source from SMCLK to ACLK.

      Hopefully this helps.

        David

  • Perfect, that works.

    Thanks.

**Attention** This is a public forum