cancel
Showing results for 
Search instead for 
Did you mean: 

Software Serial in STM32

SARTHAK KELAPURE
Associate II
Posted on January 24, 2018 at 06:48

Hello everyone,

I was curious if anyone has worked on something like Software Serial for STM32 and if there is any library made for it? If yes, please share.

#hal-uart #stm32
5 REPLIES 5
Posted on January 24, 2018 at 08:43

THE PC side VCP (virtual com port)  driver is here:

http://www.st.com/en/development-tools/stsw-stm32102.html

 

The other side CDC driver (to emulate VCP connection) can be found in the CubeMX examples. I used for F1 line.

Posted on January 24, 2018 at 09:42

Seem to remember seeing an application note, but not a very efficient. One could emulate output with SPI or TIM

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Evangelist III
Posted on January 24, 2018 at 10:39

The principles are going to be the same as for any microcontroller.

Always worth going to the Product Page for the chip concerned and looking at the list of Application Notes; eg,

0690X00000609TfQAI.png

Which is the one that

Turvey.Clive.002

‌ alluded to, and

Golab.Bogdan

‌ linked.

But why not just choose a variant with sufficient real UARTs ... ?

Posted on January 24, 2018 at 11:00

Yes, software emulation is bad especially if you have so many resources as STM32 has.

Hardware resources offload CPU - you do not have to spend time on right timing (clock counting, etc).