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.

F28M35H52C: M3 Watchdog0: WatchdogHandler is triggered even before the initialization is complete

Part Number: F28M35H52C
Other Parts Discussed in Thread: CONTROLSUITE

Hi,

   I have been following the example provided in the control suite for the watchdog timer. My understanding of how the API works don't match the actual execution sequence which I would like to confirm with you.

I have attached a video of my debugging session that clearly elaborates the following.

watchdog_init()

{

// Enable the peripheral.
SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);

// Enable the watchdog interrupt.
IntEnable(INT_WATCHDOG);

// Unlock writes to watchdog configuration.

WatchdogUnlock(WATCHDOG0_BASE);

// Set the period of the watchdog timer.
WatchdogReloadSet(WATCHDOG0_BASE, loadValue);

// Enable reset generation from the watchdog timer.
WatchdogResetEnable(WATCHDOG0_BASE);

// Enable the watchdog timer.
WatchdogEnable(WATCHDOG0_BASE);

// Lock subsequent writes to watchdog configuration.
WatchdogLock(WATCHDOG0_BASE);

}

Problem: Even before the Watchdog LOCK function is executed, a watchdog interrupt is triggered. Can someone explain why this is happening?

Am I missing something?

Anoja