cancel
Showing results for 
Search instead for 
Did you mean: 

Change USART1 pins location

Fannyrsy
Associate II

Hi everyone!

I'm using a NucleoWB55 and trying to use UART to print a message on a tera term terminal. When I let the default pins (PB7, PB6) for USART1_RX and USART1_TX I'm able to transmit and print a message correctly with the HAL_UART_Transmit_IT function. But I would like to use these pins for the I2C communication so I would like to put USART1_RX on PA10 and USART1_TX on PA9. This is the only changes I make. The TIM1_CH that used to be on that pin are simply disabled and I'm okay with that. I save and regenerate the code and the pin a correctly modified. BUT nothing happens on the terminal and nothing is printed. Do I need to do something else when I change my pins location? 

Thanks a lot, you can see below my 2 configurations : 

USART.png

USART 2.png

  

3 REPLIES 3
TDK
Guru

> I would like to put USART1_RX on PA10 and USART1_TX on PA9

Click on PA9/PA10 and select the USART1 related function.

No other changes are needed. However, these pins need to be connected to whatever you're using to get the signal to the computer. This may require solder bridges to be opened/closed if you're accessing via the headers.

TDK_0-1708695714952.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Only PB6/PB7 are intended to be used as the VCP for USART1 and have the native connections on the board.

TDK_1-1708695819106.png

 

If you feel a post has answered your question, please click "Accept as Solution".
Andrew Neil
Evangelist III

@Fannyrsy wrote:

nothing happens on the terminal and nothing is printed.   


So how are you making the connection from PA9,10 to your TeraTerm?

As @TDK said, they are not connected to the USB-to-UART "Virtual COM Port" (VCP) of the ST-Link in the Nucleo board - so you'll have to make some other connection.

 


@Fannyrsy wrote:

(PB7, PB6) ... I would like to use these pins for the I2C communication


So those pins are connected to the VCP of the ST-Link in the Nucleo board - if you want to use them for I2C instead, then you will need to break that connection...