Re: Timing Functionality on MPC555

alex shulman <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
The best way to measure duration of your code
functions
is to use Hardware Watch Points(WP). See Development
section of UM. The WPs use the same logic as Hardware
Break points, but do not stop processor and have no
effect on application. The WPs are reported on the
processor pins and can be observed with a scope.
The are 4 instruction WPs and 2 data WP. 

You can set one instruction WP to beginning of your
code and second to the end of it. WPs will be seen as
one system clock pulses. The interval between them is
your code duration.

You also can program one instruction WP to your code
address range. The WP will output sequence of pulses,
each one will correspond instruction or group of
sequential instructions in your code.

(WPs present event of instruction retirement from
processor and processor can retire up to 6
instructions
in clock).

The registers involved in the WP programming:

CMPA-CMPD, ICTRL for WP setting
(Depending on debugger, you can setup a HW break point
with debugger and then disable it modifying ICTRL)

And SIUMCR to select WP function for processor pins.

REgards
 Alex




--- Eric <[email protected]> wrote:
> Hi everyone,
> 
> It seems like this should be fairly easy, but I'm
> having a hard time
> finding the right functionality.
> 
> I want to measure how long certain functions are
> taking in my code, so
> I want a way to track time rather accurately
> (precision on the order
> of micro-seconds, hopefully).  I was wondering what
> I should be using
> just to get two values - a starting time, and an
> ending time.  I was
> hoping to read directly from the real-time clock,
> but that seems to
> give garbage as output.
> 
> Anyone know what I should be looking at?
> 
> Thanks,
> 
> -Eric Castle
> 
> 
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.