Reply by Steve Russell March 7, 20042004-03-07
Steve,

When you start using any BDM debugger, you already have the MC9S123C32
reset with the clock running so that you can issue the BDM command to start
the program.

When you do a hardware reset you get a hardware delay to allow the
oscillator to start and become stable.

See the section 5.2 - "Description of Reset Operation" in the in the
Motorola "CRG Block User Guide V04.05" documentation.

Steve Russell
Nohau Emulators

At 01:27 PM 3/6/2004, you wrote:
>I need a 5ms delay before sending a signal to a sonic transceiver.
>When I use codewarrior to start the program i get my 5ms delay (I
>use a for loop for the delay). When I switch to Run mode and start
>the program, the delay was much longer (30ms i think?). Why does
>execution apear to be faster while running in boot mode?
>
>Also I posted a question earlier that I would still like help on
>(post 6029): Using C with codewarrior, i use this statement:
>time1 = TCNT;
>For debug prurposes how can i check the value of the time1 varible
>in Codewarrior??
>
>Thank you for any help
>Steve
*************************************************************************
Steve Russell mailto:
Senior Software Design Engineer http://www.nohau.com
Nohau Corporation phone: (408)866-1820 ext. 1873
51 East Campbell Avenue fax: (408)378-7869
Campbell, CA 95008
*************************************************************************


Reply by ra March 7, 20042004-03-07
Hello Steven

Maybe I am misinterpreting your question, but normally you would look
at the variable in the data window of the "True Time Simulator" (or
whatever debugging target you are using) after setting a breakpoint.

You can either set the breakpoint in the code display of the debugger
or code it into your program by defining an inline asm call:

#define trace asm( bgnd;)

Then you insert the function call trace(); after your assignment
to trigger the breakpoint.

Good Luck!
Robert

On Mar 6, 2004, at 10:27 PM, Steven Bak wrote:

>
> I need a 5ms delay before sending a signal to a sonic transceiver.
> When I use codewarrior to start the program i get my 5ms delay (I
> use a for loop for the delay). When I switch to Run mode and start
> the program, the delay was much longer (30ms i think?). Why does
> execution apear to be faster while running in boot mode?
>
> Also I posted a question earlier that I would still like help on
> (post 6029): Using C with codewarrior, i use this statement:
> time1 = TCNT;
> For debug prurposes how can i check the value of the time1 varible
> in Codewarrior??
>
> Thank you for any help
> Steve >
> --------------------To learn more
> about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu
> o learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu
>
> Yahoo! Groups Links




Reply by zeta_alpha2002 March 6, 20042004-03-06
>When I switch to Run mode and start
> the program, the delay was much longer (30ms i think?). Why does
> execution apear to be faster while running in boot mode?

In run mode the PLL is not engage, you add that to your code. In
boot mode the PLL is engaged.


Reply by Steven Bak March 6, 20042004-03-06
I need a 5ms delay before sending a signal to a sonic transceiver.
When I use codewarrior to start the program i get my 5ms delay (I
use a for loop for the delay). When I switch to Run mode and start
the program, the delay was much longer (30ms i think?). Why does
execution apear to be faster while running in boot mode?

Also I posted a question earlier that I would still like help on
(post 6029): Using C with codewarrior, i use this statement:
time1 = TCNT;
For debug prurposes how can i check the value of the time1 varible
in Codewarrior??

Thank you for any help
Steve