Datasheet
307
SAM4E [DATASHEET]
Atmel-11157D-ATARM-SAM4E16-SAM4E8-Datasheet_12-Jun-14
13.6.5.1 SW-DP and JTAG-DP Selection Mechanism
Debug port selection mechanism is done by sending specific SWDIOTMS sequence. The JTAG-DP is selected by
default after reset.
Switch from JTAG-DP to SW-DP. The sequence is:
̶ Send more than 50 SWCLKTCK cycles with SWDIOTMS = 1
̶ Send the 16-bit sequence on SWDIOTMS = 0111100111100111 (0x79E7 MSB first)
̶ Send more than 50 SWCLKTCK cycles with SWDIOTMS = 1
Switch from SWD to JTAG. The sequence is:
̶ Send more than 50 SWCLKTCK cycles with SWDIOTMS = 1
̶ Send the 16-bit sequence on SWDIOTMS = 0011110011100111 (0x3CE7 MSB first)
̶ Send more than 50 SWCLKTCK cycles with SWDIOTMS = 1
13.6.6 FPB (Flash Patch Breakpoint)
The FPB:
Implements hardware breakpoints
Patches code and data from code space to system space.
The FPB unit contains:
Two literal comparators for matching against literal loads from Code space, and remapping to a
corresponding area in System space.
Six instruction comparators for matching against instruction fetches from Code space and remapping to a
corresponding area in System space.
Alternatively, comparators can also be configured to generate a Breakpoint instruction to the processor core
on a match.
13.6.7 DWT (Data Watchpoint and Trace)
The DWT contains four comparators which can be configured to generate the following:
PC sampling packets at set intervals
PC or Data watchpoint packets
Watchpoint event to halt core
The DWT contains counters for the items that follow:
Clock cycle (CYCCNT)
Folded instructions
Load Store Unit (LSU) operations
Sleep Cycles
CPI (all instruction cycles except for the first cycle)
Interrupt overhead
13.6.8 ITM (Instrumentation Trace Macrocell)
The ITM is an application driven trace source that supports printf style debugging to trace Operating System (OS)
and application events, and emits diagnostic system information. The ITM emits trace information as packets
which can be generated by three different sources with several priority levels:
Software trace: Software can write directly to ITM stimulus registers. This can be done thanks to the “printf”
function. For more information, refer to Section 13.6.8.1 “How to Configure the ITM”.
Hardware trace: The ITM emits packets generated by the DWT.