Watchdog timer driver for iMX-21?

Has anyone written a driver for the watchdog timer in the iMX-21 ARM processor?

In the driver init function I am setting the timer to 4 (should giver a 2 second timeout) as follows:

WCR = (WCR_WDA | WCR_SRS | WCR_WT(4));

This verifies as 0x430 when I read it back.

In the driver open funtion, I am setting the watchdog enable bit with the following:

WCR |= WCR_WDE; // again this verifies as

0x434 on a read of WCR

Now, without servicing the watchdog, when reading WCR every second, it always reads 0x434, never counting down, but the watchdog times out at

128 seconds. This happens no matter what value I place in WCR_WT. Am I missing something in initialzation?

Thanks for any help.

Reply to
twgray
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.