Motorola MSC8101 ADS User's Guide Page 252

  • Download
  • Add to my manuals
  • Print
  • Page
    / 346
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 251
12-20 MSC8101 User’s Guide
EOnCE/JTAG
Because of the pre-fetch mechanism, a three-cycle delay must occur from the
time the trace buffer is disabled until the first read access to the trace buffer is
issued.
12.9 Using EE0 to Enter Debug Mode
In the previous examples, the JTAG instruction DEBUG_REQUEST is used to enter
Debug mode. Another method of entering Debug mode is to program the
EE0 pin to cause
the SC140 core to enter Debug mode after core reset. Holding
EE0 at logic 1 during and
after core reset forces the SC140 core to enter Debug mode.
12.10 Counting Core Cycles
Core cycles are counted using the event counter, event detection unit, and event selector.
This example shows how you can use the EOnCE port to perform program profiling. The
program executes and when the start address is detected, the counter is enabled and the
core clocks are counted. When the final address is detected, a debug exception is
generated. The interrupt service routine disables the counter and calculates the number of
clocks between the start and final addresses. The event counter, event detection, and event
selector register sets are shown in Table 12-6.
1. Initialize the event counter value. Set ECNT_VAL to an initial value of
0xFFFFFFFF.
2. Specify what needs to be counted. Configure the event counter to count core
clocks by setting ECNT_CTRL[ECNTWHAT] = 1100.
Table 12-6. Event Register Sets
Name Description
Event Counter ECNT_CTRL Event Counter Register
ECNT_VAL Event Counter Value Register
ECNT_EXT Extension Counter Value Register
Event Detection Channel Address EDCA
i
_CTRL EDCA Control Register
EDCA
i
_REFA EDCA Reference Value Register A
EDCA
i
_REFB EDCA Reference Value Register B
EDCA
i
_MASK EDCA Mask Register
Event Selector ESEL_CTRL Event Selector Control Register
ESEL_DM Event Selector Mask Debug Mode Register
ESEL_DI Event Selector Mask Debug Exception Register
ESEL_ETBL Event Selector Mask Enable Trace Register
ESEL_DTB Event Selector Mask Disable Trace Register
Page view 251
1 2 ... 247 248 249 250 251 252 253 254 255 256 257 ... 345 346

Comments to this Manuals

No comments