Hi,
I suppose that your own code includes the pin assignment and the trace clock divider.
For example,the PIO1_0 is assigned as Traceclk with func 5, for detail, pls refer to section Table 256. Type D I/O Control registers: FUNC values and pin functions in UM10912.pdf
in pin_mux.c, add the code:
#defineIOCON_PIO_FUNC5
CLOCK_EnableClock(kCLOCK_Iocon);
const uint32_t port1_pin0_config = (
IOCON_PIO_FUNC5 |
/* No addition pin function */
IOCON_PIO_MODE_INACT |
/* Input function is not inverted */
IOCON_PIO_INV_DI |
/* Enables digital function */
IOCON_PIO_DIGITAL_EN |
/* Input filter disabled */
IOCON_PIO_INPFILT_OFF |
/* Standard mode, output slew rate control is enabled */
IOCON_PIO_SLEW_STANDARD |
/* Open drain is disabled */
IOCON_PIO_OPENDRAIN_DI);
/* PORT1 PIN0 (coords: B13) is configured as traceclk*/
IOCON_PinMuxSet(IOCON, 1U, 0U, port1_pin0_config);
//set the trace clock divider
CLOCK_SetClkDiv(kCLOCK_DivAhbClk, 10U, false);
Hope it can help you
BR
XiangJun Rong