cancel
Showing results for 
Search instead for 
Did you mean: 

Can I swap TX & RX USART1 STM8L152

TConl.1
Associate II

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

3 REPLIES 3
Peter BENSCH
ST Employee

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.

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

@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