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.

f28027 watchdog as Timer

Hello,

iam using a f28027 piccolo launchpad.i want to use the watchdog as a timer and when it has reached its limit i want it to go to ISR and increment the count say i++ and by this way i want to use it as a timer.how do i configure the Watchdog  for the above  function??

  • Hello!

    1 The functionality of the watchdogs is too specific and limited to perform such a task.Your device contains two watchdogs: CPU-Watchdog that monitors the core and NMI-Watchdog that is amissing clock-detect circuit. The user software must regularly reset the CPU-watchdog counter within a certain time frame; otherwise, the CPU-watchdog generates a reset to the processor. The CPU-watchdog can be disabled if necessary. The NMI-Watchdog engages only in case of a clock failure and can either generate an interrupt or a device reset.

     2 You have three timers "on board" (32-Bit CPU-Timers (0, 1, 2)). Why do not you use one of them for your task?

    Regards,

    Igor

  • Bharadwaj, Igor,

    The CPU WD can be configured to generate an interrupt (WDINT) instead of a reset.  This is controlled by the SysCtrlRegs.SCSR..bit.WDEINT bit.  See the F2802x System Control User's Guide, SPRUFN3D, section 3.4.  The WDINT feeds in the PIE interrupt controller as PIE INT1.8, where it is called the WAKEINT.

    I do agree with Igor however that the WD timer is not particularly the best timer for generating a simple interrupt.  Specifically, because It is not very flexible in terms of the interrupt period.  One of the 32-bit CPU timers would probably be better.

    Regards,

    David