ETM trace can't work on M4F

We made a M4F SoC with ETM function. ETM is the original setting of ARM.

But I can't use this function with ULinkPro and MDK.

Is there something I missed?

The ETM port as below:

GPIO0.26 = TRACESWO
GPIO0.27 = TRACECLK
GPIO0.28 = TRACEDATA[0]
GPIO0.29 = TRACEDATA[1]
GPIO0.30 = TRACEDATA[2]
GPIO0.31 = TRACEDATA[3]

And I use Trace.ini to enable these pin when start debug sessnon:

/*-------------------------------------------------------------------

** Define the function to enable the trace port
**-----------------------------------------------------------------*/
FUNC void EnableTPIU(void) {
_WDWORD(0x40010008, 0xFC000000); // disable pull-up resistor for GPIO0.26~GPIO0.31
_WDWORD(0x40010010, 0xFC000000); // enable output enable for GPIO0.26~GPIO0.31
_WDWORD(0x40010018, 0xFC000000); // enable ALT function for GPIO0.26~GPIO0.31
}

/*-------------------------------------------------------------------
** Invoke the function at debugger startup
**-----------------------------------------------------------------*/
EnableTPIU();

/*-------------------------------------------------------------------
** Execute upon software RESET
**-----------------------------------------------------------------*/
FUNC void OnResetExec(void) {
EnableTPIU();
}

The debug setting, I choice the ULINK Pro

Debug setting

This is the Trace setting:

Trace Setting

MDK start debug session:

MDK enter start debug session

MCU running

MCU running

MCU halted by break-point. NO Trace Data.

Thanks your answer.

Ruemann

More questions in this forum