2014-12-26 08:47 AM
Hi to all,
I have F401 and F411 Nucleo boards.Both boards have STLink version ''V2.J23.M7 STM32 Debug+Mass storage'' installed.However, SB15 is connected, so STLink and PB3 pin (SWO) are connected.If I open STLink and click on ''Print via SWO Viewer'', nothing happen.My first thought was that my program is failed.I took my discovery board (F429) and connect discovery board via SWD pins to nucleo (F429 acts as programmer/debugger) and everything started working, so program is OK written and SWO output is enabled.So my figure is that problem is STLink on nucleo boards.Also, when I do trace on Keil, I got error (in command line) when debug, saying ''Cannot access memory'' but program is working just five using STLink on F429 discovery or external Keil ULINK2 programmer.On mbed.org they said that everything works perfect on their boards, but I can't get it in working state.Any ideas would be great #printf #swd #swo #nucleo-f401re-swd-printf-use-sw #nucleo2014-12-26 09:39 AM
If I open STLink and click on ''Print via SWO Viewer'', nothing happen.
Is the frequency matching what the board is running at? Is it possible you're got something shorted? Do you see this with more than one Nucleo board? Does the problem exhibit with older firmware? Will see if I have a 401 Nucleo to hand...2014-12-26 10:06 AM
Frequency matches, like I said, it works with external debugger (F429-Disco and ULINK2).
Also, if I test the same firmware but 180MHz on F429-Disco, there it works without need for external debugger. The same is with F4-Discovery. On F401 and F411 does not work. I think that problem is with VCP+Mass storage feature here, don't know. It never worked for me, neighter with 2.21 version. No idea what is going on here. When I open STLink SWO viewer and hit Start, after 2-3 seconds I got Warning, saying ''Disconnected from SWV Trace port!''. Image attached. ________________ Attachments : stlink-swv-trace.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0eh&d=%2Fa%2F0X0000000bc1%2Folesck5wAJe8BAB4mGZw_MxugU1YjhMvOMKWaMhfTho&asPdf=false2015-01-22 09:02 PM
Hi,majerle.tilen
Hardware:Nucleo-F401RE +8Mhz external Software:MDK-ARM+STM32F4xx_DSP_StdPeriph_Lib_V1.4.0 I readed one discussion on website ''http://stm32f4-discovery.com/2014/12/library-46-debug-stm32f4-device-swo-feature/#more-1927'', the autor's test result is '' I’ve tested this feature on some boards: STM32F429-Discovery: worked without any problem, SB9 solder bridge required before to be soldered STM32F4-Discovery: worked without any problem STM32-Nucleo: F401: didn’t worked, I always got error that memory cannot be read, but physical connection is there by default F411: didn’t worked, I always got error that memory cannot be read, but physical connection is there by default '' and my Nucleo-F401RE can't use SWV at first either. but after read all the discussions on this page,I realized maybe it's the swv clock setting didn't match the trace setting as Clive1 mentioned. So I check the system_stm32f4xx.c and find out the default clock setting isn't 84Mhz,then I changed PLL_M=4 PLL_N=168 PLL_P=4. then recompiled and downloaded,the swv started to work properly.2015-05-21 07:05 AM
I can confirm that
V2.J23.M9
is not working with SWO on Nucleo-F401. However when I tried the same board with an external ST-link dongle it worked. So it seems like the SWO support is not stable between versions on the Nucleo ST-link.2015-05-21 08:06 AM
V2.JM10 works just fine, don't have M9, care to attach?
My Nucleo's have shorting resistors at SB15 (SWO) ________________ Attachments : stlink_v2j23m10.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0CK&d=%2Fa%2F0X0000000bc0%2FGPlKT4hTMrOQ9zgkWggRcDlSgn1G0PPnptVw8MuyjDM&asPdf=falseSWV-NUCLEO-F401RE.hex : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0eX&d=%2Fa%2F0X0000000bby%2Frh69YoMf0qvkrpObt070YBeKlmRvC4MGaVXiifTeZaY&asPdf=false2015-12-28 11:10 PM
I've made test again with new F411 Nucleo..still not working
''Cannot access memory'' in Keil uVision, in ST-Link Utility is nothing happen.2015-12-29 12:59 AM
Can't this be a driver problem on the PC side?
JW2015-12-29 01:00 AM
[sorry double post]
2015-12-29 04:14 AM
It works with external debugger, so program is OK and is working.
Via ST-Link on nucleo board it does not work for some reason.I have no idea what's going on.On F4 and F429-Discovery it works just great!