I am using the UART. Please tell me there is a need to increase the memory size of the TX buffer and RX buffer and in what circumstances
Generally, You have to describe about your ploblem, How much you want to increase, Whatelse have you done but can't realize...etc...
Did you see this dialog?
It all depends on your needs. If you are able to handle the received data fast enough, and are able to work on small portions of the input, you don't need to enlarge the buffer.
If you have a slow receive handling, or want to work on large sets of receive data, you can increase the buffer size and let the component do the interrupt and buffer handling for you.
The buffers are handled by the UART-software and are helpful when you are dealing with strings, messages or other long data-structures and not on a bytewise communication. Sending a string is returning immediately (non-blocking) when the buffer is large enough, if not the call will wait (block) until there is room for the remaining bytes.
There is an API to check for the number of bytes received so far, so that when doing some CPU-intensive calculations no data gets lost when received and not immediately processed (fetched). No own interrupt handling is needed, but you have to poll the receive buffer for messages.
... but I think, it is a very good exercise to write your own interrupt-driven circular buffer handling. This will give you some insights in programming-techniques and handling of interrupts.
I always use my own circular buffer to handle UART RX. It’s not hard and is a good exercise.
thank you for all.
It should have been explaining the situation.
I learned it is good exercise to write my interrupt-driven circular buffer handling.Thank you for me to say.