cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103 software uart

kosan
Associate II
Posted on February 28, 2017 at 13:10

how can i configure stm32f103 for software uart implementation, are there any documents, reference manual or source code?

thanks in advance.

#uart #stm32f103c8t6 #software-uart
15 REPLIES 15
Posted on March 01, 2017 at 15:59

Hi @

sevim.samet

,

You can have a look at

http://www.st.com/content/ccc/resource/technical/document/application_note/1d/61/52/64/ea/ee/42/4e/DM00110pdf/files/DM00110pdf/jcr:content/translations/en.DM00110pdf

as previously mentioned by @

Waclawek.Jan

.

This application note provides a basic example of communication between a hardware and a software UART, as well as a summary of CPU load and firmware footprint.

The

https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries-expansions/stsw-stm32license%3d14883764784html

firmware package is associated to this application note; It contains the source code of the UART emulator with all firmware modules required to run the example.

The firmware is provided for STM32F4 MCUs, but can be easily ported to STM32F1 MCUs.

Khouloud.

Posted on March 01, 2017 at 16:40

The implementation would be very similar to those used for other micros, the more salient question is why, and to achieve what format/speed, input and/or output?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
S.Ma
Principal
Posted on March 07, 2017 at 19:19

Technically, a decent and not high perf TIMER Capture (RX) and Compare (TX) channels should be able to implement a UART with limited baudrate.

Posted on March 07, 2017 at 18:38

waclawek.jan wrote:

[ ...] non-standard U[S]ART requirements.

This.  We're sadly not going to get  NRZI clock recovery or hdlc-like zero stuffing out of these USARTs

Posted on March 07, 2017 at 19:33

For TX you could likely task an SPI or GPIO+DMA+TIM

For RX, TIM in Input Capture or PWM Input

Emulating chips of yore, consider CPLD/FPGA

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on November 15, 2017 at 07:00

Can you give some pointer on porting Software UART driver to STM32F3 ?