Skip to main content
TConl.1
Associate III
March 24, 2021
Question

Can I swap TX & RX USART1 STM8L152

  • March 24, 2021
  • 2 replies
  • 2895 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

Peter BENSCH
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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
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.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
TConl.1
TConl.1Author
Associate III
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