This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PC Sample output via SWO pin in nrf52832

Hi, well the question says it all - I am trying to get the Program Counter samples sent out of the SWO pin on the nrf52832.

Use Case: I am trying to measure the power consumption of our custom board utilizing nrf52832 and synchronize it with the PC samples (code that is executing at that point in time and the power consumed). I know this approach is not highly accurate - well something is better than nothing.

What I already tried I configured the SWO pin for output - I can see the output from SWO (the printf style using ITM_SendChar)

Now I tried enabling the PC sample output on the DWT->CTRL register and its not giving any output.

DWT->CTRL = 0x400113FF;

Do I need to do anything more to get it working? Any pointers would be greatly appreciated.

Related