Skip to main content
sacraig
Associate
August 17, 2015
Question

USART2 Switching TX and RX Pins

  • August 17, 2015
  • 4 replies
  • 1643 views
Posted on August 17, 2015 at 22:32

Hi,

I am currently working with an STMF103RB on a board I made. I am using the STMCube_FW_F1_V1.2.0 libraries. I am currently using USART2 to connect to a computer though an FTDI breakout board. Everything works fine however, I forgot to connect TX/RX of the STMF103RB to RX/TX of the FTDI breakout. Is there a way to switch in firmware which pins correspond to TX and RX of USART2? E.g. have PA3 be USART2_TX and PA2 be USART2_RX?

Thanks!
    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    August 17, 2015
    Posted on August 17, 2015 at 23:23

    No

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sacraig
    sacraigAuthor
    Associate
    August 17, 2015
    Posted on August 18, 2015 at 00:56

    Thanks for the quick response.

    So if I wanted to correct for this issue without reworking the board, I would have to make like a software serial type communication that would use the pins in reverse order. Is that possible?

    Tesla DeLorean
    Guru
    August 17, 2015
    Posted on August 18, 2015 at 01:16

    The TX mode could probably be fashioned with a TIM+DMA+GPIO arrangement. RX might prove a bit more challenging, not sure what the timer associativity is with the pin. Slow baud rates might work with a periodic timer check.

    Other than that consider jumper/magwire.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sacraig
    sacraigAuthor
    Associate
    August 17, 2015
    Posted on August 18, 2015 at 01:17

    Thanks again!