I have 2 adapter as below
picasaweb.google.com/lh/photo/…pKyjDCaUs?feat=directlink
For EFM32_STK I can use below example code to enable the trace and SWO output
Display All
But for J-Link V8 I use the same environment but the trace function and SWO output not work as expect
Could anyone suggest me how to configure the SWO for J-Link V8
picasaweb.google.com/lh/photo/…pKyjDCaUs?feat=directlink
For EFM32_STK I can use below example code to enable the trace and SWO output
C Source Code
- void BSP_TraceSwoSetup(void)
- {
- /* Debug logic registers */
- volatile uint32_t *dwt_ctrl = (uint32_t *) 0xE0001000;
- volatile uint32_t *tpiu_prescaler = (uint32_t *) 0xE0040010;
- volatile uint32_t *tpiu_protocol = (uint32_t *) 0xE00400F0;
- /* Enable GPIO clock */
- CMU->HFPERCLKEN0 |= CMU_HFPERCLKEN0_GPIO;
- /* Enable Serial wire output pin */
- GPIO->ROUTE |= GPIO_ROUTE_SWOPEN;
- /* Set correct location */
- GPIO->ROUTE = (GPIO->ROUTE & ~(_GPIO_ROUTE_SWLOCATION_MASK)) | BSP_TRACE_SWO_LOCATION;
- /* Enable output on correct pin. */
- TRACE_ENABLE_PINS();
- /* Enable debug clock AUXHFRCO */
- CMU->OSCENCMD = CMU_OSCENCMD_AUXHFRCOEN;
- /* Wait until clock is ready */
- while (!(CMU->STATUS & CMU_STATUS_AUXHFRCORDY)) ;
- /* Enable trace in core debug */
- CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
- /* Enable PC and IRQ sampling output */
- *dwt_ctrl = 0x400113FF;
- /* Set TPIU prescaler to 16. */
- *tpiu_prescaler = 0xf;
- /* Set protocol to NRZ */
- *tpiu_protocol = 2;
- /* Unlock ITM and Output data */
- ITM->LAR = 0xC5ACCE55;
- ITM->TCR = 0x10009;
- }
But for J-Link V8 I use the same environment but the trace function and SWO output not work as expect
Could anyone suggest me how to configure the SWO for J-Link V8
The post was edited 1 time, last by bancha ().