Enable ETM trace function of M2351

Post Reply
workman
Posts: 6
Joined: 16 Oct 2018, 17:39

11 Jul 2019, 09:50

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.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest