MCU: TM4C1294NCPDT
TI-RTOS: v2.01.00.03
CCS: v6.0.1.0040
Hello,
I am going to add UART functionality in my project. I have gone through the UART documentation(s) but am not understanding HOW THE UART BUFFER ALLOCATION IS DONE!! What I mean is that when we call the function UART_read [in blocking mode, no call backs & timeout set to BIOS_WAIT_FOREVER] it will block execution of the task until the desired number of bytes (size of the buffer passed to this function) have been received.
Imagine a situation where due to some reason, the function UART_read is not called for a long time & a very huge number of bytes arrived on the UART port. What will happen?
1. The RTOS is going to allocate RAM to these UART data and the system will start starving for RAM
2. The UART driver will stop accepting any new byte (may be because the RTOS's UART buffer is full) coming in through the UART & will ignore all new data
3. The UART driver will keep on accepting new data & will keep on deleting old ones (FIFO type)
4. Even if situation 2 and/or 3 happens, how is the size of the RTOS's UART buffer determined or decided? I mean what function to use to set the value?
Somewhere, I feel I am missing something or having some misconception!!
Thanks
Regards
Soumyajit