Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/30/04 18:58
Read: times


 
#78449 - RE: LPC932 WDT
Responding to: ???'s previous message
Erik, Andrew I am still trying to understand how the WDT peripheral works.
This is what I have.

UCFG1 = 0xE3; //wdt reset enable

#define KICK_THE_PUPPY WFEED1 = 0x0A5; WFEED2 = 0x05A; // Erik's


Main.c
void main (void)
LED = 1;

{
P2 = 0;
for(;;)
{
unsigned char i;
state = 0x55AA;
for (i = 0x01; i; i <<= 1)
{
P2 = i; // simulate running lights
delay (50000);
}
if ((state+= 0x1111) != 0x66BB)
{
LED = 0;
Initialize_the_Puppy();
}
for (i = 0x80; i; i >>= 1)
{ P2 = i;
delay (50000);
}
if ((state+= 0x2222) != 0x88DD)
{
LED = 0;
Initialize_the_Puppy();
}
state = 0;
}
}
}

void Initialize_the_Puppy(void)
{
EA = 0;
WDCON = 0x05; //start WDT, and select WD oscillator
WDL = 0xFF;
KICK_THE_PUPPY
EA = 1;
//while(1);
}

Since I am controlling the RUN and Stop of WDT...When should I stop it?
Also, what is the advantage of having WDSE set in the UCFG register? Should the WDT be running the whole time? even if there is no reset?
I am still trying to understand this feature and have read articles and user manuals, but I still do not know when should the WDT stop if it ever should. How would guys approach this?
thanks! This feature is a still a mystery for me!
J.C.




List of 28 messages in thread
TopicAuthorDate
LPC932 WDT            01/01/70 00:00      
   RE: LPC932 WDT            01/01/70 00:00      
   RE: LPC932 WDT            01/01/70 00:00      
      RE: LPC932 WDT            01/01/70 00:00      
         RE: LPC932 WDT            01/01/70 00:00      
            RE: LPC932 WDT            01/01/70 00:00      
               RE: LPC932 WDT            01/01/70 00:00      
                  RE: LPC932 WDT            01/01/70 00:00      
                     RE: LPC932 WDT            01/01/70 00:00      
                  RE: LPC932 WDT            01/01/70 00:00      
                     RE: LPC932 WDT            01/01/70 00:00      
                        RE: LPC932 WDT            01/01/70 00:00      
                           RE: LPC932 WDT            01/01/70 00:00      
                              RE: LPC932 WDT            01/01/70 00:00      
                                 RE: LPC932 WDT            01/01/70 00:00      
                                    RE: LPC932 WDT            01/01/70 00:00      
                                       RE: LPC932 WDT            01/01/70 00:00      
                                          RE: LPC932 WDT            01/01/70 00:00      
                                             RE: LPC932 WDT            01/01/70 00:00      
                                                RE: LPC932 WDT            01/01/70 00:00      
                                                   RE: LPC932 WDT            01/01/70 00:00      
                                                      RE: LPC932 WDT            01/01/70 00:00      
                                                         RE: LPC932 WDT            01/01/70 00:00      
                                                            RE: LPC932 WDT            01/01/70 00:00      
                                                               RE: LPC932 WDT            01/01/70 00:00      
                                                                  RE: LPC932 WDT            01/01/70 00:00      
                                                                     RE: LPC932 WDT            01/01/70 00:00      
                                                                        RE: LPC932 WDT            01/01/70 00:00      

Back to Subject List