Skip to content

Long delay for Serial1.begin() / missing updateBaudRate() #524

@gicking

Description

@gicking

I have a library which provides LIN communication across a variety of architectures and serial interfaces. To generate LIN BREAK signal, I temporarily reduce the baudrate, send 0x00 and revert to the original baudrate.

However, when porting to Uno R4 Minima I found that changing the baudrate via Serial1.begin() and subsequent Serial1.write() adds a ~1.2ms pause between BREAK and SYNC, which causes LIN slaves to time-out (see also here). Specifically Serial1.begin() takes ~620µs and (only) the first Serial1.write() has a latency of ~520µs.

Can you please check what causes this long latency and improve it? Alternatively add a new method updateBaudRate(), similar to ESP32 (see here) with smaller latency? Attached please find a small sketch and screenshots to show what I mean.

Can you please look into that? Thanks a lot in advance!

Looking forward to a lot of fun with the new UNO :-)

Test_Baudrate_change.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions