Lines Matching +full:frequency +full:- +full:control
4 * SPDX-License-Identifier: Apache-2.0
13 * An SWO viewer program will typically set-up the SWO port including its
14 * frequency when connected to the debug probe. Such configuration can persist
16 * re-configure the SWO port upon boot and set the frequency as specified by
18 * this frequency should much the one set by the SWO viewer program.
20 * The initialization code assumes that SWO core frequency is equal to HCLK
21 * as defined by the clock-frequency property in the CPU node. This may require
35 /* If ITM has pin control properties, apply them for SWO pins */
40 /* Set TPIU prescaler for the current debug trace clock frequency. */
46 #error "SWO reference frequency is not configured"
54 #error CONFIG_LOG_BACKEND_SWO_FREQ_HZ is too low. SWO clock divider is 16-bit. \
55 Minimum supported SWO clock frequency is \
56 [Reference Clock Frequency]/2^16.
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()
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()
112 /* Configure Formatter and Flush Control Register */ in log_backend_swo_init()
113 TPI->FFCR = 0x00000100; 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()
119 /* Initialize pin control settings, if any are defined */ in log_backend_swo_init()