Skip to main content
RANGASWAMY HB
Associate
Sep 3, 2018 12:28 PM UTC
Question

Please some one send the example code of soft_uart for stm32f407vg

try to understand the softuart but i couldn't get any example so please send me the sample code of that

thank you in advance

This topic has been closed for replies.

6 replies

ST Technical Moderator
Sep 3, 2018 1:24 PM UTC

Hello @RANGASWAMY HB​ ,

You can have a look to any UART example available in STM32CubeF4 firmware package, as:

STM32Cube_FW_F4_V1.21.0\Projects\STM32F401-Discovery\Examples\UART

You may re-use sections available in the example or get inspired from them.

With Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Tesla DeLorean
Guru
Sep 3, 2018 2:01 PM UTC

The OP is looking for a software (bit-bang, timer) USART implementation not a hardware (peripheral) USART.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
AvaTar
Senior III
Sep 3, 2018 2:02 PM UTC

There is no soft uart example for the F407.

And it doesn't make sense, if you have 6 real uarts available.

TI used to have soft driver variants for their TM4C series, for UART, I2C, and SPI AFAIK.

waclawek.jan
Super User
Sep 3, 2018 6:24 PM UTC

https://www.st.com/en/embedded-software/stsw-stm32156.html

> And it doesn't make sense, if you have 6 real uarts available.

You'd be surprised how much sense it may make, at times... :)

JW

RANGASWAMY HB
Associate
Sep 4, 2018 4:36 AM UTC

hello JW

please some one provide me any example of softuart for stm32 series board.

thank you

AvaTar
Senior III
Sep 4, 2018 5:40 AM UTC

> You'd be surprised how much sense it may make, at times... =)

I know, there is a pin mux problem sometimes. I would resort to tricks like external switches, instead of re-implementing an uart peripheral. Had to do "soft" versions for PICs with 2 uarts, and don't miss it.

@ RANGASWAMY:

Get the TI soft-uart code for their M4 and port it to the STM32.

Or write it yourself, which is not really difficult.