EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Software reset

Started by Shayne C. Rich July 2, 2004
Hi, is there a way to generate a reset from software on the 9S12DP256?

Shayne C. Rich
Microbial Aerosol Biodetection System
1780 N Research Park Way
North Logan, UT 84341
Tel: 435-797-3431
Fax: 435-797-3328




For testing: You can use the watchdog, when it times out, a reset occurs.

Hossam

"Shayne C. Rich" <> wrote:
Hi, is there a way to generate a reset from software on the 9S12DP256?

Shayne C. Rich
Microbial Aerosol Biodetection System
1780 N Research Park Way
North Logan, UT 84341
Tel: 435-797-3431
Fax: 435-797-3328

---------------------------------
Yahoo! Groups Links

To

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


Isn't there a reset register? Poke a value. Look in the register table.

-----Original Message-----
From: Shayne C. Rich [mailto:]
Sent: Friday, July 02, 2004 1:26 PM
To:
Subject: [68HC12] Software reset Hi, is there a way to generate a reset from software on the 9S12DP256?

Shayne C. Rich
Microbial Aerosol Biodetection System
1780 N Research Park Way
North Logan, UT 84341
Tel: 435-797-3431
Fax: 435-797-3328

Yahoo! Groups Links


One simple way is to connect an output pin to the reset line.

Regards
Dave Shayne C. Rich wrote:

>Hi, is there a way to generate a reset from software on the 9S12DP256?
>
>Shayne C. Rich
>Microbial Aerosol Biodetection System
>1780 N Research Park Way
>North Logan, UT 84341
>Tel: 435-797-3431
>Fax: 435-797-3328 >
>
>Yahoo! Groups Links




Enable the COP Watchdog, then write a data different from $55 or $AA to the
ARMCOP register. This will generate an immediate Reset (the COP Watchdog
Reset Vector at $FFFA will be used when exiting from the Reset, rather than
the General Reset Vector at $FFFE).

Doron
Nohau Corporation
HC12 In-Circuit Emulators
www.nohau.com/emul12pc.html

At 13:25 02/07/2004 -0600, you wrote:
>Hi, is there a way to generate a reset from software on the 9S12DP256?
>
>Shayne C. Rich
>Microbial Aerosol Biodetection System
>1780 N Research Park Way
>North Logan, UT 84341
>Tel: 435-797-3431
>Fax: 435-797-3328
>




Why dont you use the SWI instruction

--- "Shayne C. Rich" <>
escribi > Hi, is there a way to generate a reset
from software
> on the 9S12DP256?
>
> Shayne C. Rich
> Microbial Aerosol Biodetection System
> 1780 N Research Park Way
> North Logan, UT 84341
> Tel: 435-797-3431
> Fax: 435-797-3328 >
>
> [Non-text portions of this message have been
> removed] >
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Yahoo! Domains - Claim yours for only $14.70
>
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dN_tlB/TM
>
--------------------------------~->
> Yahoo! Groups Links >
>

_________________________________________________________



> -----Original Message-----
> From: Mr angel castillo [mailto:]
> Sent: Monday, July 05, 2004 6:37 PM
> To:
> Subject: Re: [68HC12] Software reset > Why dont you use the SWI instruction

That would be a bad idea, since that generates a software interrupt.

Mike Anton





>> Why dont you use the SWI instruction

> That would be a bad idea, since that generates a software interrupt.

Therefore the processor is not returned to its power on state - anything that was configured prior to SWI will still be configured.

Andrew



Why?

You can use SWI and then

in the service SWI routine:
-reset your peripherals
-jump to the begin of your program

like rhe MCU get the reset vector end
jump to this address

> >
> > Why dont you use the SWI instruction
>
> That would be a bad idea, since that generates a
> software interrupt.
>
> Mike Anton >
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Yahoo! Domains - Claim yours for only $14.70
>
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dN_tlB/TM
>
--------------------------------~->
> Yahoo! Groups Links >
>

_________________________________________________________

At 01:28 PM 7/8/2004, you wrote:
>Why?
>
>You can use SWI and then
>
>in the service SWI routine:
>-reset your peripherals

But you cannot generate a /RESET output from the MCU the way a real reset
does. This means that external devices that depend on the MCU /RESET
signal for reset do NOT get it.

It also requires to correctly duplicate what /RESET does to all the on-chip
peripherals.

Enabling the COP and forcing a COP reset by writing 0xf0 ( or anything not
0x55 or 0xAA ) to ARMCOP is better. Hope this helps
Steve Russell
Nohau Emulators >-jump to the begin of your program
>
>like rhe MCU get the reset vector end
>jump to this address
>
> > >
> > > Why dont you use the SWI instruction
> >
> > That would be a bad idea, since that generates a
> > software interrupt.
> >
> > Mike Anton
> >
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
>_________________________________________________________ >
>
>Yahoo! Groups Links >
>






Memfault Beyond the Launch