Hi folks,
I'm Writing driver for ls1046 watchdog timer for VxWorks. I setup the watch dog 1 as the step:
val = CSR_READ_2 (pDrvCtrl, WDOG_WCR);
val &= ~WDOG_WCR_WT_MASK; /* 1. clear the old time out */
val &= (UINT16)(~(WDOG_WCR_WDE)); /* 2. disable watch dog */
val |= (UINT16)WDOG_SEC_TO_COUNT(peroid); /* 3. set time out */
CSR_WRITE_2 (pDrvCtrl, WDOG_WCR, val);
val |= (UINT16)(WDOG_WCR_WDE); /* 4. enable watch dog */
CSR_WRITE_2 (pDrvCtrl, WDOG_WCR, val);
([WDOG1] bit in DEVDISR5 register is set to 0 to enable watch dog 1 module before I set the watch dog)
I set 2s timeout in the WCR register and did not feed the watch dog, and I could see 2s timeout and the [WDE] bit was set successfully. After 2s or longer, I checked the Watchdog Reset Status Register (WRSR) to see the reset information. I did not see the [TOUT] bit is set.
If I set [SRS] bit in WCR register, I could see the [SFTW] bit in WRSR register was set.
Seems that the watch dog time out does not work. Any hint? Thanks.
Regards
Yun