25 #if defined( BSP_ETM_TRACE ) && defined( ETM_PRESENT )
27 #if !defined(BSP_TRACE_ETM_CLKLOC)
28 #define BSP_TRACE_ETM_CLKLOC 0
30 #if !defined(BSP_TRACE_ETM_TD0LOC)
31 #define BSP_TRACE_ETM_TD0LOC 0
33 #if !defined(BSP_TRACE_ETM_TD1LOC)
34 #define BSP_TRACE_ETM_TD1LOC 0
36 #if !defined(BSP_TRACE_ETM_TD2LOC)
37 #define BSP_TRACE_ETM_TD2LOC 0
39 #if !defined(BSP_TRACE_ETM_TD3LOC)
40 #define BSP_TRACE_ETM_TD3LOC 0
47 void BSP_TraceEtmSetup(
void)
55 #if defined(_GPIO_ROUTE_TCLKPEN_MASK)
65 GPIO->ROUTE =
GPIO->ROUTE | GPIO_ROUTE_TCLKPEN | GPIO_ROUTE_TD0PEN | GPIO_ROUTE_TD1PEN
66 | GPIO_ROUTE_TD2PEN | GPIO_ROUTE_TD3PEN
67 | GPIO_ROUTE_ETMLOCATION_LOC0;
91 #if defined( _GPIO_ROUTE_SWOPEN_MASK ) || defined( _GPIO_ROUTEPEN_SWVPEN_MASK )
103 #if defined( _CMU_HFPERCLKEN0_GPIO_MASK )
104 CMU->HFPERCLKEN0 |= CMU_HFPERCLKEN0_GPIO;
105 #elif defined( _CMU_HFBUSCLKEN0_GPIO_MASK )
110 #if defined( _GPIO_ROUTE_SWOPEN_MASK )
111 GPIO->ROUTE |= GPIO_ROUTE_SWOPEN;
112 #elif defined( _GPIO_ROUTEPEN_SWVPEN_MASK )
117 #if defined( _GPIO_ROUTE_SWOPEN_MASK )
118 GPIO->ROUTE = (
GPIO->ROUTE & ~(_GPIO_ROUTE_SWLOCATION_MASK)) | BSP_TRACE_SWO_LOCATION;
119 #elif defined( _GPIO_ROUTEPEN_SWVPEN_MASK )
133 CoreDebug->DHCSR |= CoreDebug_DHCSR_C_DEBUGEN_Msk;
134 CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
137 DWT->CTRL = 0x400113FF;
153 ITM->LAR = 0xC5ACCE55;
157 ITM->TER |= (1UL << 0);
162 #if defined( _GPIO_ROUTE_SWOPEN_MASK ) || defined( _GPIO_ROUTEPEN_SWVPEN_MASK )
171 volatile uint32_t *userData = (uint32_t *) USER_PAGE;
174 if (*userData == 0x00000000UL)
Clock management unit (CMU) API.
#define _GPIO_ROUTELOC1_ETMTD2LOC_SHIFT
Board support package API definitions.
#define GPIO_P_MODEL_MODE7_PUSHPULL
#define GPIO_P_MODEL_MODE6_PUSHPULL
#define GPIO_ROUTEPEN_SWVPEN
#define GPIO_ROUTEPEN_ETMTD2PEN
#define GPIO_P_MODEL_MODE4_PUSHPULL
#define _GPIO_ROUTELOC1_ETMTD0LOC_SHIFT
#define CMU_STATUS_AUXHFRCORDY
#define GPIO_ROUTEPEN_ETMTCLKPEN
#define GPIO_ROUTEPEN_ETMTD0PEN
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define GPIO_P_MODEL_MODE5_PUSHPULL
#define _GPIO_P_MODEL_MODE7_MASK
SWO Trace API (for eAProfiler)
#define _GPIO_ROUTELOC1_ETMTD3LOC_SHIFT
bool BSP_TraceProfilerSetup(void)
Profiler configuration.
#define _GPIO_P_MODEL_MODE4_MASK
void GPIO_PinModeSet(GPIO_Port_TypeDef port, unsigned int pin, GPIO_Mode_TypeDef mode, unsigned int out)
Set the mode for a GPIO pin.
#define CMU_OSCENCMD_AUXHFRCOEN
General Purpose IO (GPIO) peripheral API.
void BSP_TraceSwoSetup(void)
Configure trace output for energyAware Profiler.
void CMU_ClockEnable(CMU_Clock_TypeDef clock, bool enable)
Enable/disable a clock.
#define CMU_HFBUSCLKEN0_GPIO
#define _GPIO_P_MODEL_MODE5_MASK
void CMU_OscillatorEnable(CMU_Osc_TypeDef osc, bool enable, bool wait)
Enable/disable oscillator.
#define _GPIO_P_MODEL_MODE3_MASK
#define GPIO_P_MODEL_MODE3_PUSHPULL
#define _GPIO_ROUTELOC1_ETMTD1LOC_SHIFT
#define _GPIO_ROUTELOC0_SWVLOC_MASK
#define _GPIO_ROUTELOC1_ETMTCLKLOC_SHIFT
uint32_t CMU_ClockFreqGet(CMU_Clock_TypeDef clock)
Get clock frequency for a clock point.
#define GPIO_ROUTEPEN_ETMTD3PEN
#define _GPIO_P_MODEL_MODE6_MASK
#define GPIO_ROUTEPEN_ETMTD1PEN