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  [ 2 posts ] 
Author Message
 Post subject: watchdog of AT91SAM7x256
PostPosted: Mon Sep 28, 2009 3:05 am 
Offline

Joined: Mon Sep 28, 2009 2:29 am
Posts: 1
Hi, all
The watchdog puzzled me for several days, why the watchdog doesn't reset after following initialization
void watchdog_init(void)
{
AT91F_WDTC_CfgPMC();
AT91C_BASE_WDTC->WDTC_WDMR = AT91C_WDTC_WDV|AT91C_WDTC_WDD|AT91C_WDTC_WDRSTEN|AT91C_WDTC_WDIDLEHLT||AT91C_WDTC_WDDBGHLT;
}
but if I change "WDT_MR_Val EQU 0x00008000" to "0x3FFF2FFF" in "SAM.s", the watchdog is ok...
I notice "The Watchdog Mode Register (WDT_MR) can be written only once. Only a processor reset resets it. Writing the WDT_MR register reloads the timer with the newly programmed mode parameters." but i'm not very clear about it, if WDT_MR can be written only once, what does reloads means???
hlps, thanks


Top
 Profile  
 
 Post subject: Re: watchdog of AT91SAM7x256
PostPosted: Tue Sep 29, 2009 12:06 pm 
Offline

Joined: Tue Sep 29, 2009 11:10 am
Posts: 1
Hello!

I think reaload means that if you write the Control Register (WDT_CR) with the bit WDRSTT to 1 then the Watchdog counter is immediately reloaded from WDT_MR and restarted, starting count down from the WDV value. But if you write the WDT_SR again then a new WDV value is set and this changes the Watchdog's operation. You can write it only once means, I think, that if you want the WDT to operate as you need you must not rewrite the WDT_SR because you will lost the current value of the WDT.

TD


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 3 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: