AnsweredAssumed Answered

V11.0.0 SWO Data not working for 55s69

Question asked by Andrew Capon on Jul 18, 2019
Latest reply on Aug 7, 2019 by Andrew Capon

Hi Guys,

 

First thanks for adding SWO stuff in for this board.

 

Unfortunately for me the data watch is not working.

 

While paused in the debugger I can add a global variable and the Value is displayed correctly.

 

Then when execution is resumed to value is displayed as 0 and no events are recorded.

 

It is easy to replicate, start by importing the hello_world_swo example.

 

Add a global unsigned int count variable, and increment this in the run loop.

 

Add a breakpoint in the loop and start debugging.

 

Now add a BWT item for the count variable, you will see it has the correct value.

 

Remove breakpoint and resume execution, values goes to 0 and stays there.

 

Any ideas ?

 

Thanks

 

Andy

 

unsigned int  uCount = 0;
int main(void)
{
    /* Init board hardware. */
    /* attach 12 MHz clock to FLEXCOMM0 (debug console) */
    CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);
    /*!< Switch TRACE to TRACE_DIV */
    CLOCK_AttachClk(kTRACE_DIV_to_TRACE);

    BOARD_InitPins();
    BOARD_BootClockFRO12M();
    BOARD_InitDebugConsole();
    BOARD_InitKey();
    BOARD_InitDebugConsoleSWO(DEMO_DEBUG_CONSOLE_SWO_PORT, DEMO_DEBUG_CONSOLE_SWO_BAUDRATE);
    while (1)
    {
      uCount++;
       if (g_userPress)
      {
         PRINTF("SWO: hello_world\r\n");
         g_userPress = false;
      }
    }
}

Outcomes