AnsweredAssumed Answered

Typical task setup for UART/TTYA asynchronous read/write

Question asked by Jama Mohamed on Jun 9, 2015
Latest reply on Jun 12, 2015 by Jama Mohamed

Hi all,

 

I have been trying to get UART to work, and with limited success. I understand how to open and use the low level drivers via the open/read/fstatus calls, but what I am wondering is how to structure my tasks and code so that I don't have to close/open the file every time I want to use it (and thus losing all of the settings and not being able to read correctly).

 

I want to know how many tasks to use to keep the file open, the structure of interrupting, whether or not it's standard to use message queues to pass characters around, and how the main tasks can poll the message queues to figure out if there is data that has been read. The main problem I am facing now is my code which polls isn't able to catch RX reads of large strings over serial because sometimes the poll doesn't happen until the buffer overflows.

 

Anyways, any advice on the general setup of such a system would be greatly appreciated.

 

Thank you!

Outcomes