Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | HCS12 Watchdog...Reset

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

HCS12 Watchdog...Reset - folg...@yahoo.com - Jan 14 8:21:30 2009

Hello,

I need for my programm a reset-function. I want to call a function ResetApplication(). Then I want to use the watchdog to reset the application.
I do not know how to use the watchdog exactly.
After the reset the programm should start at the beginning.

If the following code complete or have I to do something else. To reset I only have to start the watchdog!?

void ResetApplicatio(void)
{
COPCTL= 0x01;
}

Best regards

------------------------------------



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: HCS12 Watchdog...Reset - Rob Milne - Jan 14 8:52:20 2009

That'll work though you may want to prevent further processing while
waiting:

void ResetApplication( void)
{
asm("sei");
COPCTL=0x01;
while(1);
}

-rob
f...@yahoo.com wrote:
> Hello,
>
> I need for my programm a reset-function. I want to call a function
> ResetApplication( ). Then I want to use the watchdog to reset the
> application.
> I do not know how to use the watchdog exactly.
> After the reset the programm should start at the beginning.
>
> If the following code complete or have I to do something else. To reset
> I only have to start the watchdog!?
>
> void ResetApplicatio( void)
> {
> COPCTL= 0x01;
> }
>
> Best regards

------------------------------------



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )