cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030R8 PA14 FOR Programming AND UART 2 TX

Nimit Vachhani
Associate III
Posted on March 30, 2018 at 08:53

Greetings All,

I want to use PA14 for programming (which i am currently using) and after programming once controller resets i want to use same pin as UART 2 TX pin. How can i achieve this ?

#stm32f030r8 #uart2
6 REPLIES 6
Posted on March 30, 2018 at 12:55

You mean programming through SWD, from STLink or similar?

You'll need to use the ''connect under reset'' option for programming,

0690X0000060AGOQA2.png

- or equivalent in your programming environment - and connect the respective STLink line to NRST.

JW

Posted on March 31, 2018 at 09:13

Well thanks for the info. By default i have that selected. My question is can i configure PA14 as SYS_SWCLK and UART2 TX pin in CUBE. I have seen pin stacking function in ST Cube. It is possible from cube ?

Posted on March 31, 2018 at 18:37

I don't Cube so I don't know (I don't even know what pin stacking means). But you can simply set it as UART2_TX, and when programming, during reset it will function as SWCLK (that's why you need the connect under reset for programming).

You won't be able to debug through SWD, though.

JW

T J
Lead
Posted on March 31, 2018 at 23:13

I have the cube running for you here now, PA2 is the optional pin for Uart2, can you use that pin ?

did you make your own board ?

PA14 is used for the SWD_CLK, so connecting the UartTX chip wont hurt in any way.

Posted on May 11, 2018 at 07:06

@TJ - Hey. Well can you let me know what should i do at my end ? I have my own board using stm32f030r8. How can i configure it in Cube ?

Posted on May 11, 2018 at 07:17

Its extremely easy, what parts do you have connected ?

open the cube and select your peripherals, then hold control down, click on a pin that is allocated

( left click while holding Control down), will show you the alternate pins that offer the same function.

Select the pins you want, then adjust the schematic.

The cube will generate the low level interface.

it works very well.

I think you are looking toward Revision 2 of your PCB, a board spin, so to say.