View
16
Download
0
Category
Preview:
Citation preview
Working with ETM/SWO on high performance Cortex-M7 devices
David Källberg, Field Application Engineer
Agenda • Arm Cortex-M7
– Architecture – Debug features
• Achieve max SWO/ETM performance • Demo SWO/ETM on STM32H7
Arm Cortex-M7
Arm Cortex-M7
Arm Cortex-M7 • High performance core
• More power efficient then Arm Cortex-M4
• 6-stage pipeline
• Optional SP/DP FPU
• Complete hardware debug solution – Coresight with ETMv4, ITM and SWO
DWT
CPU statistics
FPB 8 breakpoints
DAP
JTAG
Live core access
I-jet
Interrupt trace SWD/SWO
ITM Instrumentation Trace
ETM trigger
ETB instruction trace
ETB Embedded Trace Buffer
ETM Embedded Trace Macrocell
ETMv4
instruction trace
Trace port
4 watchpoints
PC sampler ITM Software trace 32 channels
Time stamping
Cortex-M7 Coresight overview
6 SWD
Achieve max SWO/ETM performance
Performance – the challenge • Cortex-M7 devices runs very fast
– i.MX RT runs @ 600 MHz • Performance limited by:
– CPU I/O performance – PCB, connectors and cables – Debug probe
SWO - features • Sampled instruction trace • Data access log
– DWT has 4 watchpoints • Interrupt log • ITM events
– Non-intrusive printf style messages • And more...
SWO - performance
Example – STM32H7 – CPU clk 400 MHz – PLL1VCO = 800 MHz – DIRR = 3 – SWO clocked by 800/3 – SWO prescaler – Manchester mode (/2)
Setup – Manchester mode – 266.66 MHz clock – With I-jet:
266/4/2 = 33 MHz – With I-jet Trace
266/2/2 = 66 MHz
ETM - features • Complete instruction trace • Travel back in time
– Millions of instructions • Profiling • Code coverage • And more...
ETM - performance Example – STM32H7
– CPU clk 400 MHz – PLL1VCO = 800 MHz – Board spec
TRACECLK = 50 MHz
Setup – I-jet Trace – MIPI 20 connector – CLK = 800/3/2 = 133M – ETM capture success
Demo ETM/SWO on STM32H7
• SuperSpeed USB 3.0 interface (5 Gbps) • Fully compatible with USB 2.0 (480 Mbps) • No power supply required, powered entirely by the USB port • Target power of up to 600mA can be supplied from I-jet Trace
with overload protection • Automatic core recognition • JTAG, SWD, target power consumption measuring
I-jet Trace for ARM Cortex-A/R/M
Trace features • Trace memory size up to 256 Mbyte • Up to 16-bit wide trace data collection • Up to 350MHz ETM trace clock • 64-bit timestamp with CPU cycle accuracy for timing analysis • Automatic alignment of parallel trace data skew on individual bits to compensate for PCB layout
and signal integrity problems • Automatic trace data and clock voltage threshold adjustments to get the most reliable capture with
noisy or un-terminated target boards • Support for trace logic levels from 1.2 V to 5V
Summary • Cortex-M7 brings high performance
• SWO and ETM gives possibilities
• Requires good debug performance
• I-jet and I-jet Trace enables high performance debugging of Cortex-M7
• Get scanned to have this presentation emailed to you.
• Visit IAR Demo Space to get a demo of our technology.
Want to learn more?
Thank you for your attention!
Recommended