cancel
Showing results for 
Search instead for 
Did you mean: 

Inverting UART TX Pin in STM32F103

DKarc
Associate II

Hello,

I'm porting code from STM32F072 to STM32F103. In F0 I had a option in CubeMX to invert UART Tx pin polarity and it worked very well. I do not have this option in F103's. Is there any way to invert polarity in this uC?

BR, Daniel

2 REPLIES 2
Clive1 (HNL)
Senior II

Not that I'm aware of, the F1 is very old, and a lot of lessons from that design were learned and applied to subsequent ones.

Perhaps you can make a soft UART output with a TIM, and/or GPIO+DMA ? Or SPI

DKarc
Associate II

Hey,

so I'm getting back to work with this project and I have found software serial library on github, link below:

https://github.com/liyanboy74/soft-uart

This code look very elegant and simple. I will implement it today. This library has no option to invert Tx signal, but I think this has to be accomplished by setting the inverted state at idle time, and just adding NOT in SoftUartGpioWritePin funcion? Am I right?