cancel
Showing results for 
Search instead for 
Did you mean: 

Use the same UART with STlink and with another module

Fannyrsy
Associate II

Hi everyone !

I'm really new to STM32 and everything that goes around... I want to communicate with a SIMCOM A7670E with my NucleoWB55RG and UART1. I'm using PB6 and PB7 for USART1_TX and USART1_RX. But these pins (I kept the jumpers) are also connected to TX_STlink and RX_STlink right? That's why I can print on a tera term terminal what is happening on the UART right? (I followed a tutorial with no explenations that's why I'm not sure). 

My question is : is it a problem if I connect PB6 and PB7 on RX and TX of my 4G module? Maybe it will cause a conflict?

Thanks a lot!

3 REPLIES 3
Fannyrsy
Associate II

stlink.png

You're going to have to make choices..

Can you use SWV/SWO ITM_SendChar() for diagnostic output?

Or find some other free UART-TX pin you can wire over to the ST-LINK output channel?

Go through the pin mapping options in the Datasheet, enumerate the pins available to you

https://www.st.com/resource/en/datasheet/stm32wb55rg.pdf

For example

PB5 LPUART1_TX

PA2 LPUART1_TX

PB11 LPUART1_TX

PC1 LPUART1_TX

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

@Fannyrsy wrote:

My question is : is it a problem if I connect PB6 and PB7 on RX and TX of my 4G module? Maybe it will cause a conflict?


Yes, it will cause a conflict.

You will be shorting your 4G module's TX output with the ST-Link's TX output - that will not end well.

As @Tesla DeLorean said, you need to consider options:

  • Disconnect UART1 from the ST-Lik, and move your debug IO to SWV/SWO instead;
  • Use a different UART for the 4G module.