This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMSIS UART Driver, permanent receive not available?

Hello All,

in the CMSIS there is a framework for UART communication.
However I have to know in advance how many characters to receive.

I would have expected that UART driver write to kind of circular buffer permanently.

Because usually I do not know WHEN there is communication and HOW MANY data will be transmitted.
I assume that when I abort the receive function with timeout and start again the receive function that in the mean time I might loose data on the hardware. Because if the receive function is not active no DATA AVAILABLE event will be handled.

In my real live projects I only use the UART transmit functions and reimplement my custom receive functions.

How does CMSIS address this issue?
What is the best practice here?

Best regards.

Adib.

Parents
  • Hi.

    You're question does not make very good sense!

    The functions buffer up the data when it arrives. It is not important that it is a circular buffer. When you ask "have you got data" it will return what it has. if you do not ask for enough, the buffer is used to keep what you have not taken until you ask for more.

    It is very easy and it is not unusual to do it this way.

Reply
  • Hi.

    You're question does not make very good sense!

    The functions buffer up the data when it arrives. It is not important that it is a circular buffer. When you ask "have you got data" it will return what it has. if you do not ask for enough, the buffer is used to keep what you have not taken until you ask for more.

    It is very easy and it is not unusual to do it this way.

Children