Skip to main content
Visitor II
March 24, 2021
Question

Can I swap TX & RX USART1 STM8L152

  • March 24, 2021
  • 2 replies
  • 1874 views

Hi Everyone,

I have an issue with USART1 where my board designer mixed up the TX and RX pins going to an external module. Is there any way to swap them in software? I've had a look though the reference manual and seen the remapping feature but its not what I need and I know about the SWAP feature but it doesnt seem to be availble on my chip.

I'm fairly sure it's not possible without bitbanging but just checking to be sure.

Also If bitbanging is the only option, would it be possible to acheive at 115200? This is the default baud rate of the receiving module and I won't be able to change it until I can communicate with it.

Thanks,

Tiarnan

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    March 24, 2021

    The swap function has been added to the younger STM32 MCU family. Unfortunately there is no STM8 that offers this feature.

    115200 with softUART is challenging, especially when the STM8 is doing something else as well.

    Regards

    /Peter

    Graduate II
    March 24, 2021

    uBlox modem? Watch also IO voltage expectations.

    Cut the traces at a place with easiest access, scratch off the copper, and solder cross-over bridging wire.

    TConl.1Author
    Visitor II
    March 24, 2021

    @Community member​ ​ Ublox modem yep. I've cut the traces and swapped them over.Do you know what polarity and phase the Ublox modem expects?

    My IO voltage is at 1V8 level