AN2090 Freescale Semiconductor / Motorola, AN2090 Datasheet - Page 8

no-image

AN2090

Manufacturer Part Number
AN2090
Description
Using the SC140/SC1400 Enhanced On-Chip Emulator Stopwatch Timer
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Setting Up the Stopwatch Timer In the Debugger
2.6 Adapting Stopwatch Timer Code to SC140 Devices
The stopwatch timer implementation controls the emulator by writing to its memory-mapped registers. The
addresses of these registers are determined in the memory map of the device in which the SC140 core is embedded.
The offset between the base address of the memory-mapped peripherals and the addresses of the emulator registers
is the same across SC140-based devices. Therefore, when the stopwatch timer code is adapted to a specific device
it suffices to set the value of REG_BASE_ADDRESS in the header file EOnCE_registers.h. In the Software
Development Platform (SDP), the base register of the emulator is 0x00EFFE00. Consult the user manual of the
specific DSP for the value of this C macro.
3
Occasionally developers are faced with a situation where instrumentation of the code is not possible. For example,
the code might be available in object form only. In such cases, execution times can be measured by setting up the
stopwatch timer within the Metrowerks Code Warrior SC140 debugger, as explained in this section.
3.1 Initializing the Stopwatch Timer
When the stopwatch timer is set up within the debugger, the triggering event executes the first instruction in the
measured code. Program code disassembly is used to obtain the address of this first instruction.
3.1.1 Setting Up the Event Detector
The procedure to set up the stopwatch timer is described in this section. To set up the event detector, find the
starting address of measured function or sequence of instructions, as follows:
The starting address can be found in mixed mode, as shown in Figure 4.
8
Setting Up the Stopwatch Timer In the Debugger
Note: In the following descriptions of selecting options in the debugger windows, the → symbol separates
1.
2.
Choose
In the debugger window, choose
each command in the menu hierarchy. For example,
the hierarchy to be followed to select the EDCA1. In this example, one would highlight EOnCE in
the menu bar, then highlight EOnCE Configurator, and finally choose the EDCA1 tab.
Using the SC140/SC1400 Enhanced On-Chip Emulator Stopwatch Timer, Rev. 1
P
ROJECT
D
EBUG
.
MIXED
.
EO
N
CE
EO
N
CE C
ONFIGURATOR
Freescale Semiconductor
EDCA1
lists

Related parts for AN2090