Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

Questions about Uart API and Thread Suspension

$
0
0

Hello,

I have some questions about the Uart API in a multi-threaded application.

1) Is the g_sf_comms->read call really blocking, I mean is the calling thread

suspended (another thread got the cpu) until bytes were received or the

parameter timeout expires ?

 

2) When does the g_sf_comms->write call relinquish the cpu, is it when

all bytes are transmitted or ist earlier because the payload is internally

transferred to an underlying interrupt/callback mechanism ?   

 

3) Is it necessary to spend the Uart thread the highest priority of all

(not the same as another thread which be round robin schedule i think,

and of course not lower) to not miss any byte ?

 

4) I know the Synergy hardware uses a 16 bytes ringbuffer and the

framework has an adjustable input queue. Can I calculate the max. time

the Uart thread get's suspended must not exceed byte transfer time * queue size in bytes

and how can I achieve this ?  

 

The bytes to recieve are coming asynchronously at unpredictable time and quantity.

 

I hope someone could give me a explanation about this.

Best regards

Heinz


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>