Reply by Doron Fael July 12, 20042004-07-12
Dave,

In order for HCS12 devices to identify an external Reset as such, the Reset
line needs to be held low for 128 ECLK cycles. If the external Reset is not
held low for that many cycles, the external Reset vector will not be taken
(other Reset vectors like to COP Watchdog Reset vector or the Clock Monitor
Reset vector may be used).

The method with the port pin that you suggest, has a problem that the Reset
signal is not held low for 128 ECLK cycles, since the port pin becomes
tri-stated as soon as Reset is recognized by the HCS12.

Specifically for the HCS12, the method of enabling the COP Watchdog and
writing anything other than $55 or $AA to the ARMCOP register, is probably
the best. The Reset pin is an open-drain bidirectional pin, so in case of a
COP Watchdog Reset, it drives out the Reset line low for 64 ECLK cycles, so
external devices may also be receive the CPU Reset pulse, and act accordingly.

Hope this helps,
Doron
Nohau Corporation
HC12 In-Circuit Emulators
www.nohau.com/emul12pc.html

At 21:11 08/07/2004 -0400, you wrote:
>I alway suggest using a spare port pin and connect it to the /reset
>line. Program the output bit value to 0 and then change it from the
>default input to an output. This resets the cpu and any xternal devices
>using the reset. It also avoids the problem of not being able to turn
>the COP back on if it has previously been disabled. The only downside is
>that you use up a port pin.
>
>Regards
>Dave >Steve Russell wrote:
>
> >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
> >>>



Reply by Bob Smith July 9, 20042004-07-09
Regardless of the merit of the idea, it still does not create the equivalent
of a RESET. None of the hardware registers are restored to their reset
values. This has many implications depending on what the user wants to do.

Speaking generically, Motorola MCUs do not provide an obvious function to
generate a RESET action. The usual method of creating the equivalent of a
RESET action is to manipulate the COP subsystem so that it triggers a COP
RESET. Other schemes involve pulling the RESET pin low with a monostable
multivibrator (one-shot) triggered by a port pin.

Best wishes, Bob Smith --- Avoid computer viruses, Practice safe hex ---

-- Specializing in small, cost effective
embedded control systems --

http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith
Smith Machine Works, Inc.
9900 Lumlay Road
Richmond, VA 23236 804/745-2608
----- Original Message -----
From: "Mr angel castillo" <>
To: <>
Sent: Thursday, July 08, 2004 4:28 PM
Subject: RE: [68HC12] Software reset 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 Links

a.. To



Reply by Dave Perreault July 8, 20042004-07-08
I alway suggest using a spare port pin and connect it to the /reset
line. Program the output bit value to 0 and then change it from the
default input to an output. This resets the cpu and any xternal devices
using the reset. It also avoids the problem of not being able to turn
the COP back on if it has previously been disabled. The only downside is
that you use up a port pin.

Regards
Dave Steve Russell wrote:

>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
>>
>>
>>
>>
>>
> >Yahoo! Groups Links





Reply by Steve Russell July 8, 20042004-07-08
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 >
>





Reply by Mr angel castillo July 8, 20042004-07-08
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 >
>

_________________________________________________________

Reply by Andrew Lohmann's New Email Server July 6, 20042004-07-06


>> 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



Reply by Michael Anton July 5, 20042004-07-05


> -----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



Reply by Mr angel castillo July 5, 20042004-07-05
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 >
>

_________________________________________________________

Reply by Doron Fael July 2, 20042004-07-02
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
>




Reply by Dave Perreault July 2, 20042004-07-02
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