Skip to main content
Associate II
February 28, 2024
Question

Use the same UART with STlink and with another module

  • February 28, 2024
  • 3 replies
  • 1657 views

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!

    This topic has been closed for replies.

    3 replies

    FannyrsyAuthor
    Associate II
    February 28, 2024

    stlink.png

    Tesla DeLorean
    Guru
    February 28, 2024

    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Andrew Neil
    Super User
    February 28, 2024

    @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.

     

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.