cancel
Showing results for 
Search instead for 
Did you mean: 

Where do basic System Debug setting happen using STM32Cube

kartik
Associate II
Posted on April 30, 2014 at 20:40

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.

Regards

Kartik

#stm32f439-iar
4 REPLIES 4
Posted on April 30, 2014 at 21:10

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kartik
Associate II
Posted on April 30, 2014 at 22:02

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.

Regards

Kartik

Posted on April 30, 2014 at 22:42

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 30, 2014 at 23:58

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..