Softwareserial issue on stm32 f411re

All about boards manufactured by ST
Post Reply
DonGorgon
Posts: 1
Joined: Sat Jun 20, 2020 11:17 am

Softwareserial issue on stm32 f411re

Post by DonGorgon »

Hello everyone,

I got a shield for arduino uno. There are 2 UART devices on this shield .
On arduino uno everything work fine. So i decide to install my shield on nucleo64 board.
my nucleo is equipped with stm32 f411re core. i'm using stm32duino api.

And here occure an issue. UARt devices doesn't work together.
When i run them separtly (only one is initialized) they work fine.

I can't use HardwareSerial, cause they are not connected to hardwareserial pins.

I tried also used "Serial.listen()" function but it doesnt help.

Are there any limitations due to softwareserial on stm32duino compare to normal arduino?
Or i miss something ?

Thanks in advance for any help,

ABOSTM
Posts: 24
Joined: Wed Jan 08, 2020 8:40 am
Answers: 1

Re: Softwareserial issue on stm32 f411re

Post by ABOSTM »

Hi @DonGorgon,
The PullRequest provides some informations about softwareSerial implementation.
https://github.com/stm32duino/Arduino_C ... 2/pull/645

As you can see, yes there is a limitation:
baudrate max 57600 with 80MHzh MCU frequency. And this is for a single SoftwareSerial.
Nevertheless,the good new is that example 'TwoPortReceive' used to work well. Please note that baudrate for this example is 9600.

So I would advice you to decrease baudrate as much as possible.
And try to start from 'TwoPortReceive' example and adapt it to your shield.
Try to simplified your sketch to the minimum: keep only Software serial (to avoid being disturbed by other stuff, specially around interrupt treatment) and check whether it is still failed.

If still failed, can you provide more information on your setup:
* which baurate are you using for both devices ?
* which shield are you using ?
* how devices are working (asynchronous data sending to MCU or only on request from the MCU ...)?
* You may share your sketch (simplified to keep only software serial and confirmed it is still failed )
* describe a bit more how it fails: only 1 device doesn't work ? or both ? are data corrupted or you never get data ? ...

Post Reply

Return to “STM boards (Discovery, Eval, Nucleo, ...)”