cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK/V2 vs stm32f4discovery?

arro239
Senior
Posted on September 13, 2014 at 01:46

I am having troubles setting up IAR Function Profiler so I wanted to double-check:

The grey ''ST-LINK/V2'' device vs the debug interface within discovery board. Are these the same exact thing? At least my Windows displays both as STlink dongle.

I have ''normal'' breakpoints working with IAR debugger but I cannot figure out how to get Function Profiler functioning. The UI there is... special. What CPU clock does SWO configuration window refer to - is that 168MHz in my case or is if the CPU clock of the debugger? Would it be the default 72MHz? What else can I be missing?

3 REPLIES 3
Posted on September 13, 2014 at 16:07

The use of SWO for SWV/Trace generally expects that the selected clock matches what you're running the core at via the PLL or whatever, for the STM32F4 this would typically be 168 MHz, or 180 MHz of the F42x. Check system_stm32f4xx.c file for your settings.

Also various Discovery boards will need one of the Solder Bridges (SB) made to connect PB3 to the SWO pin of the debugger interface. Refer to the board manual.

The SWV can be checked with the ST-LINK Utilities, and outputting a stream of characters via the ITM interface.

I have done this with Keil, and the ST-LINK Utilities, no specific experience with IAR
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
arro239
Senior
Posted on September 13, 2014 at 16:26

Got IAR Function Profiler somewhat working once I set 168MHz - it just works sometimes and does not work sometimes, I have not yet figured how to get it to work reliably.

Thank you for the ST-LINK Utilities hint, I will definitely look into this! So the ST-LINK/V2 device turned to not be required for that.

clive1, thank you for your help one more time.

Nickname306_O
Senior
Posted on September 30, 2014 at 19:32

Hi belomutskiy.andrey,

The Debug Probe STLink-V2 and The embedded STLink are identical.

Only one difference is that the Debug Probe supports both STM8 and STM32 microcontroller families.

Regarding the IAR Profiler Function, Could you please answer my following questions :

- STLink firmware version ? ( see log generated by ST-Link Utility)

- Rate(sample/s)? ( IAR Debugger Window : STLink --> SWO Configuration )

- IAR toolchain version ?

Best Regards,

Nouha