The
Instruction Outside Range from Address A to Address B is Executed
trigger type is used to trigger on a program instruction execution outside the range, Address A - Address B, where Address A is the address at which trigger A is set and Address B is the address at which trigger B is set.
If the triggers A and B set in this trigger type contain a function between them, the trace data will start collecting from the code inside that function because that code is outside the address range of trigger A and trigger B.
Note: For the MC9S08PT60 target specifically, the Instruction Outside Range from Address A to Address B is Executed trigger will hit when any instruction outside the range between trigger address A and trigger address B matches with the data on the bus or program address outside the range.
To collect trace using the
Instruction Outside Range from Address A to Address B is Executed
trigger type:
- In the CodeWarrior Projects view, select the Sources folder of your project.
- Double-click the source file, for example, main.c to display its contents in the editor area. Replace the source code in the main.c file with the source code shown in Listing: Source code 2.
- Remove the entries of Performance1(); from the main(); function. The main() function now should look as shown below:
Listing: main() function of source code 2
void main(void)
{
EnableInterrupts; /* enable interrupts */
/* include your code here */
Recursive(2);
for(;;)
{
entry();
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
}
- Save and build the project.
- Open the Debug Configurations dialog box, and select your project in the tree structure.
- Click the Trace and Profile tab, and check the Enable Trace and Profile checkbox.
- Click Apply and close the Debug Configurations dialog box.
- Set trigger A at EnableInterrupts; and trigger B at __RESET_WATCHDOG(); in the main() function as shown in figure below.
- Open the Debug Configurations dialog box, and select your project in the tree structure.
- Click the Trace and Profile tab.
- Select the Collect Program Trace option in the Trace Mode Options group.
- Select the Automatically option.
- Select the Collect Trace From Trigger option in the Trace Start/Stop Conditions group.
- Check the Break on FIFO Full checkbox.
- Ensure that the Instruction Execute option is selected in the Trigger Selection group.
- Select the Instruction Outside Range from Address A to Address B is Executed option from the Trigger Type drop-down list.
- Click Apply to save the settings.
- Click Debug to debug the application.
- Click Resume to collect the trace data.
The application stops automatically.
- Open the Trace Data viewer following the steps explained in the Viewing Data topic to view the collected data.
The following figures show the trace and timeline data generated by the application in which trace starts at
Recursive(2), which is called from
main(). The tracing starts at
Recursive(2) because this function is placed between address range of trigger A and trigger B, therefore the code of this function is outside the address range of the two triggers. The application stops automatically when buffer gets full.
Figure 1. Trace Data - Instruction Outside Range 
Figure 2. Timeline - Instruction Outside Range 