cancel
Showing results for 
Search instead for 
Did you mean: 

SWV Statistical Profiling with STEVAL-IHM039V1 and ST-LINK/V2

AFyre.1
Associate

Hello!

Having some issues getting this to work, is it even possible with this setup?

PB3 (connected to the JTAG connector) has been reassigned to "SYS_JTDO_SWO", and core clock is at 168MHz.

A schematic of the EVAL-boards JTAG connector is available on page 6/24 in this pdf:

https://www.st.com/content/ccc/resource/technical/document/user_manual/11/80/94/38/c9/d5/4a/02/DM00075652.pdf/files/DM00075652.pdf/jcr:content/translations/en.DM00075652.pdf

JP3 has been tested in both open and closed configurations.

The ST-LINK/V2 documentation gives this pinout ( page 12/19):

https://www.st.com/content/ccc/resource/technical/document/user_manual/65/e0/44/72/9e/34/41/8d/DM00026748.pdf/files/DM00026748.pdf/jcr:content/translations/en.DM00026748.pdf

In CubeMX, under the SYS tab, debugging is configured to "Trace Asynchronous Sw", as seen in the image below. JTDO (JTAG connector pin 13) is hence reassigned to SWO.

0693W0000000JcYQAU.png

The clocking is configured as:

0693W0000000JXwQAM.png

Debug settings in STM32CubeIDE is:

0693W0000000JowQAE.png

And SWV settings as below:

0693W0000000JppQAE.png

After starting a recording and running the code, I get 3-5 samples, and then nothing. I've tried multiple PC sampling resolutions in the SWV settings without any difference.

Live expressions are working as intended, confirming that the code is still running.

Any help would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
mattias norlander
ST Employee

Live expressions and SWV is using different communication method.

First thing that comes to mind is whether your application later re-initiates PB3 to some other functionality? Or does your code change clock speed on the fly?

Maybe you can check GPIOB configuration in the SFR-view to see if anything is modified between when you get 3-5 samples and when the trace goes dead..

View solution in original post

1 REPLY 1
mattias norlander
ST Employee

Live expressions and SWV is using different communication method.

First thing that comes to mind is whether your application later re-initiates PB3 to some other functionality? Or does your code change clock speed on the fly?

Maybe you can check GPIOB configuration in the SFR-view to see if anything is modified between when you get 3-5 samples and when the trace goes dead..