Lines Matching +full:timestamp +full:- +full:prescaler
4 * SPDX-License-Identifier: Apache-2.0
13 * An SWO viewer program will typically set-up the SWO port including its
16 * re-configure the SWO port upon boot and set the frequency as specified by
21 * as defined by the clock-frequency property in the CPU node. This may require
40 /* Set TPIU prescaler for the current debug trace clock frequency. */
54 #error CONFIG_LOG_BACKEND_SWO_FREQ_HZ is too low. SWO clock divider is 16-bit. \
84 log_output_func(&log_output_swo, &msg->log, flags); in log_backend_swo_process()
96 CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; in log_backend_swo_init()
98 ITM->LAR = 0xC5ACCE55; in log_backend_swo_init()
99 /* Disable stimulus ports ITM_STIM0-ITM_STIM31 */ in log_backend_swo_init()
100 ITM->TER = 0x0; in log_backend_swo_init()
102 ITM->TCR = 0x0; in log_backend_swo_init()
104 TPI->SPPR = IS_ENABLED(CONFIG_LOG_BACKEND_SWO_PROTOCOL_NRZ) ? 2 : 1; in log_backend_swo_init()
105 /* Set SWO baud rate prescaler value: SWO_clk = ref_clock/(ACPR + 1) */ in log_backend_swo_init()
106 TPI->ACPR = SWO_FREQ_DIV - 1; in log_backend_swo_init()
108 ITM->TPR = 0x0; in log_backend_swo_init()
110 DWT->CTRL &= (DWT_CTRL_POSTPRESET_Msk | DWT_CTRL_POSTINIT_Msk | DWT_CTRL_CYCCNTENA_Msk); in log_backend_swo_init()
111 DWT->CTRL |= (DWT_CTRL_POSTPRESET_Msk | DWT_CTRL_POSTINIT_Msk); in log_backend_swo_init()
113 TPI->FFCR = 0x00000100; in log_backend_swo_init()
114 /* Enable ITM, set TraceBusID=1, no local timestamp generation */ in log_backend_swo_init()
115 ITM->TCR = 0x0001000D; in log_backend_swo_init()
117 ITM->TER = 1 << ITM_PORT_LOGGER; in log_backend_swo_init()