|
I wanna use watchDog in AT91SAM7SE256. I have tried by enabling the watchdog with the following settings:
#define AT91C_WDTC_WDV ((unsigned int) 0xFFF <<0); #define AT91C_WDTC_WDRSTEN ((unsigned int) 0x1 <<13); #define AT91C_WDTC_WDD ((unsigned int) 0xFFF <<16);
In c_startup_SAM7.c //enabling the watchdog AT91C_BASE_WDTC->WDTC_WDMR=(unsigned int) AT91C_WDTC_WDV|AT91C_WDRSTEN | AT91C_WDTC_WDD|0x0<<15;
In MAIN.C
AT91PS_WDTC pWDTC; while(1) { pWDTC->WDTC_WDCR = 0xA5000000; AT91F_WDTSetMode(pWDTC, AT91C_WDTC_WDD1|((0xFFE<<0) & AT91C_WDTC_WDV)); }
The problem what I am facing is that the microcontroller restarts at every 16Seconds. How can I reload the watchdog so that it doesnot restart at every 16 seconds. The WatchDog should restart the firmware when the firmware hangs. By what value the reloard value should be set, so that it remains between window 0 to WDD.
from, Mr. Kagzi
_________________ Nvr knw a man by his apparel,but by his actions Muhammad
|