2018-03-29 11:53 PM
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 #uart22018-03-30 03:55 AM
You mean programming through SWD, from STLink or similar?
You'll need to use the ''connect under reset'' option for programming,
- or equivalent in your programming environment - and connect the respective STLink line to NRST.
JW
2018-03-31 02:13 AM
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 ?
2018-03-31 11:37 AM
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
2018-03-31 02:13 PM
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.
2018-05-11 12:06 AM
@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 ?
2018-05-11 12:17 AM
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.