Other Parts Discussed in Thread: HALCOGEN
Hi,
I'm trying to set up the DWD on a TMS570LS0332.
I'm trying to use an rti compare interrupt to service the watchdog, setting the compare period to half of what the timeout value is.
The data sheet says the expiration time can be found using
texp = (DWDPRLD + 1) × 2^13/RTICLK
the RTI1CLK is at 80MHz, so I should be able to have a timeout of 0.000102 s up to 0.41943 s
I tried using DWDPRLD = 127, which should mean a timeout of 13.1072 ms, so I set CMP[1].UDCPx and CMP[1].COMPx to half of that, 65536.
My program flow is
- initialize the RTI and start the counter
- call dwdInit with my preload value of 127
- call dwdCounterEnable
- enable rti notifications for compare 1
When I get the rti notification I service the watchdog by calling dwdReset.
My program continually resets because of a windowed watchdog end time violation. I have tried setting the preload value to 4095 and set the RTI to go off every 1 ms....but I still get the resets because of a timeout condition.
Any idea what I am doing wrong?
Thanks,
David