Question, DMA and U(S)ART use

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
piwi1263
Posts: 11
Joined: Mon May 15, 2017 2:19 pm
Has thanked: 5 times
Been thanked: 2 times

Question, DMA and U(S)ART use

Postby piwi1263 » Wed Apr 11, 2018 6:06 pm

Hi All,

is the following known and covered in the DMA/UART/USART area.

Efficiently use of DMA with UART RX from ST forum

I'm just wondering how ChibiOS is preventing from data loss on the receiving side as described in above link.

Care to elaborate ?

Thanks in advance,

Peter.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Question, DMA and U(S)ART use

Postby Giovanni » Wed Apr 11, 2018 7:52 pm

You can't in principle using UART alone, you need to design a protocol where lost characters are handled using timeouts. The UART driver also allows to start and stop operations allowing to perform partial transfers. Errors are handled using callbacks. Idle detection is also possible but not strictly required IMO.

So let's discuss the protocol first, then design the state machine for the protocol, then how implement to it using ChibiOS.

Giovanni

piwi1263
Posts: 11
Joined: Mon May 15, 2017 2:19 pm
Has thanked: 5 times
Been thanked: 2 times

Re: Question, DMA and U(S)ART use

Postby piwi1263 » Sat Apr 14, 2018 9:32 am

Hi Giovanni,

thanks for the reply.

The goal was not to start a conversation about protocols and their implementation, sorry for not being all that clear. When I stumbled over the article on STM forum I just was wondering how ChibiOS was preventing from that to happen. How, is not that important to me, basically it is and how to cope with eventualities if they may occur and under what circumstances.

If I've understood your answer correctly from the basics it is handled so I do not need to worry that much on the ChibiOS level.

Thanks again,

Peter.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Question, DMA and U(S)ART use

Postby Giovanni » Sat Apr 14, 2018 10:17 am

Hi,

That application not is quite generic, it is a solution for an unspecified problem, just pointing out "we have idle detection".

Giovanni


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 9 guests