WdtReset() - MC9S12XD512MAA

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WdtReset() - MC9S12XD512MAA

2,306 Views
Gerald1
Contributor I
hi,

what does a WdtReset() with the processor? does it disable Port Signales? i wanna test how long the time is from a WdtReset() till startup by setting a pin before WdtReset() and resetting the pin in the init function...but doesnt work well;/

i use a MC9S12XD512MAA

bye
 
 
 
 
 
 
 
Added p/n to subject.


Message Edited by NLFSJ on 2008-02-27 12:05 PM
Labels (1)
0 Kudos
Reply
4 Replies

593 Views
Gerald1
Contributor I
what is WdtReset() doing with a pin which i set to 0?
0 Kudos
Reply

593 Views
bigmac
Specialist III
Hello,
 
During the reset process, all port outputs will become inputs.  What might work is to set the pin to a low output state at the start of your code, wait for a known amount of cycles, and clear the watchdog timer.  Then set the pin to a high output state, and enter a wait loop until reset occurs.  An external pullup resistor should be connected to the pin.
 
You should then observe the pin at a low state following initialisation.  The pin will then become high when the full watchdog timeout commences, and should remain high when reset occurs and the pin becomes an input.  Subtract the watchdog timeout period from the period that the pin remains high, and you should have the hardware initialisation period.
 
The process should repeat over and over, so you should be able to judge whether there is any variability of the timing.
 
Regards,
Mac
 
0 Kudos
Reply

593 Views
Xbot
Contributor II
The program to re-initialize... A pin that is set to zero will depend on what you did on your initialization.
0 Kudos
Reply

593 Views
Xbot
Contributor II
This will reset your sytem. I'm not sure you can use the CodeWarrior compiler to simulate the latency tho... setting a variable doesn't do the job.
 
another thing, be sure you know how to simulate a WDTReset.


Message Edited by Xbot on 2008-02-27 06:20 AM
0 Kudos
Reply