cancel
Showing results for 
Search instead for 
Did you mean: 

Can you change SWO output to a different GPIO? I want to use the SPI that conflicts with the SWO, but still need to printf on SWO.

Matt Roybal
Associate II
Posted on January 29, 2018 at 21:09

Hello, I am using STM32F103 and STM32F301. I need to use the SPI that shares the same pin as SWO. Is it possible to move the SWO to a different pin so I can retain the printf to console functionality for debugging?

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on January 29, 2018 at 21:29

Only PB3 supported. Use a USART_TX as an alternative. 

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

View solution in original post

5 REPLIES 5
Posted on January 29, 2018 at 21:29

Only PB3 supported. Use a USART_TX as an alternative. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Matt Roybal
Associate II
Posted on January 29, 2018 at 22:29

Hi Clive, thanks for the info! So I just need to chose a group of pins, such as RX1/TX1, TX2/TX2, RX3/TX3 and get a UART protocol running on those pairs?

T J
Lead
Posted on January 29, 2018 at 23:58

In the cube, you can hold <cntl> and click the pin to see alternatives, for the SPI port, I mean...

T J
Lead
Posted on January 30, 2018 at 07:10

You use the cube software, to see the available pins for your requirements.

Did you use the cube before ?

Edit:

before the cube there is the reference material;

PM0214   STM32F3 and STM32F4 Series Cortex®-M4 programming manual.

Also, in the processor data sheet

look for PA9  in the alternate function pin map.

here you can see all the variations of all the pins.

Posted on January 30, 2018 at 10:47

SWO =

S

erial

W

ire

O

utput - as the name suggests, it is output (Tx) only.

http://infocenter.arm.com/help/topic/com.arm.doc.ddi0314h/Chdhgebe.html

 

So there would be no need to reserve an Rx pin for equivalent funcitonality