cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4Discovery STLink/V2 SWV

jcsoo
Associate II
Posted on September 17, 2014 at 18:23

I've been running into a problem with STLink/V2 SWV output when running firmware V2J21S0. The first time after plugging into USB, trace output works great. However, after disconnecting from the target and then reconnecting (keeping it physically plugged in) SWV output is garbled or nonexistent.

To reproduce this using the ST-LINK Utility on Windows, do the following (assuming you have firmware programmed that does SWV output):

1. Unplug and re-plug the STM32F4DISCOVERY board.

2. Connect to the target.

3. Open the Serial Wire Viewer and press ''Start''. You should see trace output.

4. Press ''Stop''. The trace output should stop.

Steps 5 and 6 below confirm that you can restart trace within a single session.

5. Press ''Start''. The trace output should continue. 

6. Press ''Stop. The trace output should stop.

7. Close the SWV window and disconnect from the target.

8. Connect to the target.

9. Open the SWV window and click ''Start''. At this point you should see the ''Printf data number'' incrementing, but see no output or possibly garbled output.

If you then disconnect and repeat steps 1-4 again (unplugging and replugging the device) you should see trace working again.

I've reproduced this with multiple tools running on OSX including my own custom scripts. Unfortunately this makes it impossible to do any automated testing using SWV output.

Can anyone point me to a fix or to the best place to file a bug report? 

4 REPLIES 4
Posted on September 17, 2014 at 19:32

V2J17S0 Seems to work without issue

V2J21S0 Seems to increment ''Printf data number'', but provides no output

V2J23S0 Seems to work without issue

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jcsoo
Associate II
Posted on September 17, 2014 at 19:50

Thanks for the info! I didn't know there was a newer firmware version, and the latest I can find on the web site is V2J21S0. Can you tell me where I can find V2J23S0?

Posted on September 17, 2014 at 20:05

http://mbed.org/teams/ST/wiki/Nucleo-Firmware

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jcsoo
Associate II
Posted on September 17, 2014 at 20:37

Thanks very much, V2J23S0 does the trick. Not sure how I ever would have figured this out from the ST web site!