Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Best way to read data from UART

$
0
0

Hi TI,

I would like to receive 69 bytes from UART RX pin of my microcontroller. My question is, what's the best way to do it?

This is what I have in mind:

1.) Set the rx fifo level interrupt every UART_FIFO_RX1_8
2.) Read the RX 1/8 of the fifo inside the ISR callback function and save it to global buffer
3.) Set a global flag counter everytime step 2(above) happens
4.) Post a msg event inside the ISR if the global flag counter meets the predefined value = 69
5.) Process the uint8 buffer[69] in the msg event switch case

I'm quite confused on what is the best RX FIFO buffer len to be set during UART Initialization. I've looked into some references and I found out it should be power of 2.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



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