2014-04-30 11:40 AM
I'm working with a project generated by STM32CubeMX. I can see all the generated code that enables the various IPs and all the pin configuration. However, I can't locate where GPIOs are set to be used for SWD/SWO. I can see in CubeMX that PB3, PA13 and PA14 are setup for debug but I don't see this specifcally in the code. I'm asking because, when I try to get SWO output from the demonstration project, I get nothing. It leads me to believe that perhaps the BSP in the demo project does not enable the SWO pin and I wanted to find out where this happens. Any help is appreciated.
RegardsKartik #stm32f439-iar2014-04-30 12:10 PM
I'd be surprised if you need to initialize them at all, JTAG/SWD works at power up
For SWO (PB3) and SWV to work, you typically have to make sure any solder bridges on the ST boards are made, and that your viewer is correctly configured with the core speed of the processor, which is critical.2014-04-30 01:02 PM
Thank you Clive. I actually am using the STM32F439-EVAL board. I created my own project using STM32Cube and was able to properly setup the SWO outout which I can see on the IAR Terminal IO. I tried to do the same thing on the demo project but I can't see anything on the Terminal I/O. I followed these
http://community.silabs.com/t5/Microcontroller-How-to-Guides/SWO-printf-in-IAR/td-p/98257
which worked on my project but does not work on the full GUI Demo that comes with the STM32F4 Firmware.Thanks for the help. I'll keep checking my project configuration in IAR.RegardsKartik2014-04-30 01:42 PM
Just be conscious if it runs at 180 MHz or 168 MHz, refer to system_stm32f4xx.c (or whatever)
I have an STM324x9I-EVAL, using Keil, but don't recall trying SWV on it, but have on most DISCO board, will do a quick port later.2014-04-30 02:58 PM
Ok, just confirmed to myself that SWV is working on the STM324x9I-EVAL, used J17 FW on the ST-LINK/V2, SWV on J19 seems a bit broken.