problem during reset

Started by Stewart Prince July 9, 2003
We've just designed a new board using the D60A-Developed the code in C
using Codewarrior and the simulation works....so does the actual board
except for the reset circuit. For some reason, the program doesn't
begin to function properly until the watchdog timer times out. We're
using the On Semi 34064 to control the hardware reset line, and all
seems well, but the program just doesn't start in the right place. Any
suggestions?
Stewart Prince
Professor, Mech Eng
Cal State Northridge



hi stewart:

do you have a capacitor in the reset circuit? the cpu can generate internal
resets from the cop and a capacitor on the reset line would hold the line
low fooling the processor into thinking the reset was external. also, are
you sure that the clock oscillator is stable at the time the 34064 allows
the reset pin to go high? i've read (on this forum) some references about
extended reset delays, however, it has not been an issue here so i have not
researched this (although it may have been a problem to others). please post
the specifics on the fix to this when you find it (for the benifit of the
group).

i'm curious about your statement "but the program just doesn't start in the
right place". are you referring to an errant vector address or the reset
hardware issue (cop vs. reset)?

regards,

ed

----- Original Message -----
From: "Stewart Prince" <>
To: <>
Sent: Wednesday, July 09, 2003 4:32 PM
Subject: [68HC12] problem during reset > We've just designed a new board using the D60A-Developed the code in C
> using Codewarrior and the simulation works....so does the actual board
> except for the reset circuit. For some reason, the program doesn't
> begin to function properly until the watchdog timer times out. We're
> using the On Semi 34064 to control the hardware reset line, and all
> seems well, but the program just doesn't start in the right place. Any
> suggestions?
> Stewart Prince
> Professor, Mech Eng
> Cal State Northridge >
> -------------------- >
> ">http://docs.yahoo.com/info/terms/



Ed
Thank you for responding
No, I didn't place a capacitor on the reset line because the manual
suggested otherwise. However, the data sheet on the 34064 does show an
application which uses a cap. Am I interpreting the manual correctly?
Also, I'm using CodeWarrior to develop the code-the *.prm file is
listed below showing the vector locations for interrupt zero (reset).
If I am correct, when a reset occurs, the program will go to the
startup routine, where I send out a character on the serial channel.
When I turn of the power, nothing happens for two seconds, after which I
finally see the character, when the watchdog timer times out.

Thanks again
Stewart Prince

VECTOR ADDRESS 0xfFFC _Startup /* set reset vector on _Startup */
VECTOR ADDRESS 0xfFFA _Startup /* set reset vector on _Startup */
VECTOR ADDRESS 0xfFF8 _Startup /* set reset vector on _Startup */
VECTOR ADDRESS 0xfFF6 _Startup /* set reset vector on _Startup */
VECTOR ADDRESS 0xfFF4 _Startup /* set reset vector on _Startup */
VECTOR ADDRESS 0xfFF2 _Startup /* set reset vector on _Startup */
VECTOR ADDRESS 0XfFF0 RTIInterrupt
VECTOR ADDRESS 0xfFEE Tc0Interrupt /* set reset vector on _Startup */
VECTOR ADDRESS 0xfFE4 Tc5Interrupt /* set reset vector on _Startup */

//VECTOR ADDRESS 0xF7EE Tc0Interrupt /* set reset vector on _Startup */
VECTOR ADDRESS 0XfFc0 ProbInterrupt /*this is what happens when I type
int. and rti go off at same time */
VECTOR ADDRESS 0XfFde TofInterrupt
VECTOR 0 _Startup /* set reset vector on _Startup */
Ed Taylor wrote:

>hi stewart:
>
>do you have a capacitor in the reset circuit? the cpu can generate internal
>resets from the cop and a capacitor on the reset line would hold the line
>low fooling the processor into thinking the reset was external. also, are
>you sure that the clock oscillator is stable at the time the 34064 allows
>the reset pin to go high? i've read (on this forum) some references about
>extended reset delays, however, it has not been an issue here so i have not
>researched this (although it may have been a problem to others). please post
>the specifics on the fix to this when you find it (for the benifit of the
>group).
>
>i'm curious about your statement "but the program just doesn't start in the
>right place". are you referring to an errant vector address or the reset
>hardware issue (cop vs. reset)?
>
>regards,
>
>ed
>
>----- Original Message -----
>From: "Stewart Prince" <>
>To: <>
>Sent: Wednesday, July 09, 2003 4:32 PM
>Subject: [68HC12] problem during reset >
>
>>We've just designed a new board using the D60A-Developed the code in C
>>using Codewarrior and the simulation works....so does the actual board
>>except for the reset circuit. For some reason, the program doesn't
>>begin to function properly until the watchdog timer times out. We're
>>using the On Semi 34064 to control the hardware reset line, and all
>>seems well, but the program just doesn't start in the right place. Any
>>suggestions?
>>Stewart Prince
>>Professor, Mech Eng
>>Cal State Northridge
>>
>>
>>
>>--------------------
>>
>>
>>
>>">http://docs.yahoo.com/info/terms/
>>
>>
>>
> >-------------------- >
>">http://docs.yahoo.com/info/terms/



Stewart,

The COP Watchdog uses the vector at address FFFA, and the external Reset
uses the Vector at address FFFE.

I don't see in your code below that you specify a vector for address FFFEH
(the external Reset vector).

Can it be that address FFFE is un-initialized and therefore your code goes
nowhere upon external Reset, but starts correctly upon the COP Watchdog
Reset and its initialized vector at FFFA?

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

At 01:42 PM 7/10/2003 -0700, you wrote:
>Ed
>Thank you for responding
>No, I didn't place a capacitor on the reset line because the manual
>suggested otherwise. However, the data sheet on the 34064 does show an
>application which uses a cap. Am I interpreting the manual correctly?
> Also, I'm using CodeWarrior to develop the code-the *.prm file is
>listed below showing the vector locations for interrupt zero (reset).
> If I am correct, when a reset occurs, the program will go to the
>startup routine, where I send out a character on the serial channel.
>When I turn of the power, nothing happens for two seconds, after which I
>finally see the character, when the watchdog timer times out.
>
>Thanks again
>Stewart Prince
>
>VECTOR ADDRESS 0xfFFC _Startup /* set reset vector on _Startup */
>VECTOR ADDRESS 0xfFFA _Startup /* set reset vector on _Startup */
>VECTOR ADDRESS 0xfFF8 _Startup /* set reset vector on _Startup */
>VECTOR ADDRESS 0xfFF6 _Startup /* set reset vector on _Startup */
>VECTOR ADDRESS 0xfFF4 _Startup /* set reset vector on _Startup */
>VECTOR ADDRESS 0xfFF2 _Startup /* set reset vector on _Startup */
>VECTOR ADDRESS 0XfFF0 RTIInterrupt
>VECTOR ADDRESS 0xfFEE Tc0Interrupt /* set reset vector on _Startup */
>VECTOR ADDRESS 0xfFE4 Tc5Interrupt /* set reset vector on _Startup */
>
>//VECTOR ADDRESS 0xF7EE Tc0Interrupt /* set reset vector on _Startup */
>VECTOR ADDRESS 0XfFc0 ProbInterrupt /*this is what happens when I type
>int. and rti go off at same time */
>VECTOR ADDRESS 0XfFde TofInterrupt
>VECTOR 0 _Startup /* set reset vector on _Startup */
>Ed Taylor wrote:
>
> >hi stewart:
> >
> >do you have a capacitor in the reset circuit? the cpu can generate internal
> >resets from the cop and a capacitor on the reset line would hold the line
> >low fooling the processor into thinking the reset was external. also, are
> >you sure that the clock oscillator is stable at the time the 34064 allows
> >the reset pin to go high? i've read (on this forum) some references about
> >extended reset delays, however, it has not been an issue here so i have not
> >researched this (although it may have been a problem to others). please post
> >the specifics on the fix to this when you find it (for the benifit of the
> >group).
> >
> >i'm curious about your statement "but the program just doesn't start in the
> >right place". are you referring to an errant vector address or the reset
> >hardware issue (cop vs. reset)?
> >
> >regards,
> >
> >ed
> >
> >----- Original Message -----
> >From: "Stewart Prince" <>
> >To: <>
> >Sent: Wednesday, July 09, 2003 4:32 PM
> >Subject: [68HC12] problem during reset
> >
> >
> >
> >
> >>We've just designed a new board using the D60A-Developed the code in C
> >>using Codewarrior and the simulation works....so does the actual board
> >>except for the reset circuit. For some reason, the program doesn't
> >>begin to function properly until the watchdog timer times out. We're
> >>using the On Semi 34064 to control the hardware reset line, and all
> >>seems well, but the program just doesn't start in the right place. Any
> >>suggestions?
> >>Stewart Prince
> >>Professor, Mech Eng
> >>Cal State Northridge
> >>



TEST