User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 27
www.energymicro.com
For more information on how to enable the debug pin outputs/inputs the reader is referred to
Section 32.3.4.1 (p. 753) , the ARM Cortex-M3 Technical Reference Manual and the ARM CoreSight
Technical Reference Manual
Note
Leaving the debug pins enabled will lead to an increase in current consumption in EM2-
EM4
6.3.2 Embedded Trace Macrocell v3.5 (ETM)
The ETM makes it possible to trace both instruction and data from the processor in real time. The
trace can be controlled through a set of triggering and filtering resources. The resources include 4
address comparators, 2 data value comparators, 2 counters, a context ID comparator and a sequencer.
Before enabling the ETM, the AUXHFRCO clock needs to be enabled by setting AUXHFRCOEN in
CMU_OSCENCMD. The trace can be exported through a set of trace pins, which include:
• TCLK Trace Clock. Functions as a sample clock for the trace. This pin is disabled after a reset.
• TD0-TD3 Trace Data 0 - Trace Data 3. The data pins provide the compressed trace stream. These
pins are disabled after a reset.
For information on how to configure the ETM, see the ARM Cortex-M3 Technical Reference Manual and
the ARM CoreSight Technical Reference Manual. The Trace clock and Trace Data pins can be enabled
through the GPIO. For more information on how to enable the ETM Trace pins, the reader is referred
to Section 32.3.4.2 (p. 753) .
6.4 Debug Lock and Device Erase
The debug access to the Cortex-M3 is locked by clearing the Debug Lock Word (DLW), see
Section 7.3.2 (p. 33)
When debug access is locked, the debug interface remains accessible, but the connection to the Cortex-
M3 core is blocked as shown in Figure 6.2 (p. 28) . This mechanism is controlled by the Authentication
Access Port (AAP) as illustrated by Figure 6.1 (p. 27) .
Figure 6.1. AAP - Authentication Access Port
SW-DP AHB-AP
Cort ex-M 3
SerialWire
debug
interface
DEVICEERASE
Authentication
Access Port
(AAP)
ERASEBUSY
Obtaining debug access by unlocking the device must take place during the APP window. The APP
window can also be extended giving the debugger more time to access the device by issuing the bit
pattern on swdio/swclk as shown in Figure 6.3 (p. 28) . After the APP window has closed, program
execution will start if the device was successfully unlocked.