Logo

Enable ETM trace function of M2351

, 2019年7月11日|
0
6577
0
M2351 support ETM function to trace the firmware execution.
To enable ETM,

1. Connect Arm ULINK PRO to Cortex Debug + ETM connector on NuMaker-PFM-M2351 board.
2. Enable ETM-Trace multi-function pin of M2351:
SYS->GPE_MFPH = (SYS->GPE_MFPH &(~(TRACE_CLK_PE12_Msk | TRACE_DATA0_PE11_Msk | TRACE_DATA1_PE10_Msk | TRACE_DATA2_PE9_Msk | TRACE_DATA3_PE8_Msk))) | TRACE_CLK_PE12 | TRACE_DATA0_PE11 | TRACE_DATA1_PE10 | TRACE_DATA2_PE9 | TRACE_DATA3_PE8;

3. Set project option -> Debug -> Use ULINK Pro ARMv8-M Debugger -> Settings -> Trace
"Trace Enable" = enable, "ETM Trace Enable" = enable, "Use Core Clock" = enable, "Core Clock" = [correspond to M2351 core clock]
"Trace Port" = Sync Trace Port with 4-bit Data
4. Start debug session and open "View -> Trace -> Trace Data" to view the trace data.