Displaying time in Simulator

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Displaying time in Simulator

1,544 Views
Simulator_Displ
Contributor I

Hi all. I am new to CodeWarrior. I have used MPLAB in the past for PIC products and I got used to the stopwatch that allows you to see the cycles and time from a certain point in the code. Is there something similar in the CodeWarrior and if yes how can I use it?

 

Thanks

Labels (1)
0 Kudos
3 Replies

306 Views
CrasyCat
Specialist III

Hello

 

- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
To retrieve that info:
- Start CodeWarrior
- Select Help -> About Freescale CodeWarrior
- Click on "Install Products"
- CodeWarrior version used is displayed on top in the Installed Products dialog.

 

Are you looking for a  way to check how many cycles are spend between 2 breakpoints?

Are you interested in getting how much time is spent since you started running the application?

 

CrasyCat

0 Kudos

306 Views
Simulator_Displ
Contributor I

 The CPU i am targeting is the MC9S08JM60

I am using the  V6.2 build 8127

 

I am looking for a  way to check how many cycles and time are spend between 2 breakpoints.

I am looking for a  way to check how many cycles and time are spend between 2 lines of code.

I would be interested in getting how much time is spent since I started running the application.

 

I am also looking for a way to graphicaly see the state of each pin. Something similar to the Simulator Logic Analyzer of MPLAB.

 

Thanks 

0 Kudos

306 Views
CrasyCat
Specialist III

Hello

 

In order to check how many cycles have elapsed since you started the application check the "CPU Cycles" counter in the Register window. It indicates the number of cycles since you started running the application (or since the last "Clear Cycle Counts" you have performed.

 

 

In order to check how many cycles are taken between 2 breakpoints, you can do the following

   - Start debugger

   - Set your breakpoints

   - Run to first breakpoint

   - Select "HCS08FCS" -> "Clear Cycle Counter"

   - Run till next breakpoint is reached.

     The "CPU Cycles" displayed in the Register View displays the number of cycles between the 2

     breakpoints.

 

The simulator allows you to check the value of the memory mapped registers only.

As far as I know you do not have access to the PIN states.

 

 

CrasyCat

0 Kudos