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.

CC3220S-LAUNCHXL: WDT and LPDS incompatible

Part Number: CC3220S-LAUNCHXL
Other Parts Discussed in Thread: CC3200

I am trying to use the Watchdog timer in the power_measurement sdk example, but if I init and set the Watchdog, the 

LPDS mode will not kick-in. I am setting the watchdog parms exactly like the watchdog sdk example.

Is there something else that should be done before Power_enablePolicy(); using sdk 1.30

Thanks, Tom

  • Hi Tom,

    In the Watchdog timer drivers, there is a call to Power_setConstraint(PowerCC32XX_DISALLOW_LPDS) in WatchdogCC32XX_open(). This prevents the processor from entering LPDS while you have the Watchdog timer enabled. This makes the Watchdog timer incompatible with LPDS. You will have to choose one or the other.

    The reasoning behind this might be that the Watchdog timer is clocked by the 80MHz fast clock of the CC3220, which is turned off in LPDS. Thus, if the processor entered LPDS the Watchdog will no longer be clocked and it will no longer run. Furthermore, upon entering LPDS the RAM, CPU context and peripheral context is lost. The power management interface drivers allows you to enter and exit LPDS gracefully by helping you save and restore memory in RAM as well as the CPU context, but doesn't do the same for the peripheral context. As such, the Watchdog timer would probably also experience issues if you were to go into LPDS while it is active.


    Regards,

    Michael

    Edit: As of SDK version 2.40.00.05, the information above is out of date. The WDT can be used with LPDS on the CC3220 due to power driver modifications that automatically reinit the WDT after an LPDS cycle. See the watchdog example in SDK versions >=2.40.xx.xx for an example of how to run the WDT + LPDS.

  • Michael,
    This worked fine in Gen1 of the cc3200...wdt was stopped across lpds cycles...then, just re-init upon wake as other peripherals...
    So, how would I stop the wdt in order to go into lpds?

    Thanks, Tom
  • Hi Tom,

    You are actually unable to stop the Watchdog timer until you reset the device. This is because once you enable to Watchdog timer interrupt by setting the INTEN bit in the WDTCTL register, it ignores any further writes to that control bit. This behavior is the same as in Gen1. Thus, in the Watchdog timer drivers there is no mechanism to turn off the Watchdog timer once started.

    Given that you say that you were able to use the Watchdog timer in Gen1 through LPDS, through letting it lose its context in LPDS and then setting it back up once you left LPDS, you can try doing the same in Gen2 as well. Try commenting out that Power_setConstraint() call I mentioned in the WatchdogCC32XX.c source file and then copying that modified source file into your power_measurement project or rebuilding the TI Drivers.

    Regards,

    Michael

    Edit:As of SDK version 2.40.00.05, the information above is out of date. There is no need to modify the CC3220 WDT driver files to enable operation of the WDT + LPDS. See the watchdog example in SDK versions >=2.40.xx.xx for an example of how to run the WDT + LPDS.