Hi,
I have a TWR-LS1021a Eva Board, and I want to enable the watchdog so when kernel has a panic it will trigger system to reset.
Everything is set up correctly now, but I want to purposely damage the first filesystem and trigger the watchdog timer to throw exception so that the system can automatically reboot after the watchdog timer expires.
I was doing something in the uboot:
=> mm.b 0x2ad0000
02ad0000: 00 ?
02ad0001: 30 ?
according to the date sheet 1021ARM let's assume I want to set the time to 8 seconds so
02ad0000: 00 ? ---------------------------------> 0000 1111 --------->0x0f
since 0x00 is 0.5 seconds
.
.
so 0x 0f is 8 seconds
then enable the watch dog timer by setting up bit 13 to 1 which is
02ad0001: 30 ? -----------------------------------> 0000 0100 ------->0x04
not sure if the value I gave is correct. But after I set up the values the system reboots immediately and after reboot the device the values go back to default:
02ad0000: 00 ?
02ad0001: 30 ?
When I checked the QorIQ LS1021a reference manual the watdog section it says:
========================================================
Once the WDOG is activated, it must be serviced by the
software on a periodic basis. If servicing does not take place, the timer times out. Upon
timeout, the WDOG asserts the timeout signal (wdog_rst_b) as reset request to COP.
=========================================================
Does that mean I need to set the Watchdog Service Register as well?
Please help any instructions will be grateful.
"Must be serviced by software on periodic basis" means you have to periodically access watchdog register to "service" it, so it will see you are alive and no reset is needed. Setting the register only once is not enough.
Assuming you are using our Linux, please look the following page of our Linux SDK to understand, how to work with watchdog in our Linux.