Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: WatchDog AT91SAM7SE256
PostPosted: Sat Apr 30, 2011 11:38 am 
Offline

Joined: Wed Mar 09, 2011 11:42 am
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: