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

Why doi I get ARM_USART_EVENT_RX_TIMEOUT on incomming data?

I set up a usart link and can send data fine. I can also send data with an expected reply just fine. However, if I sit idle and wait for data, I get a time out flag when it comes in?

for example
while(1)//wait ford command
{ if (_listen && _IN_FLAG) {//do stuff }
}

and
if (event & ARM_USART_EVENT_RECEIVE_COMPLETE) _IN_FLAG=1;

I never see my _IN_FLAG because the call back issues a ARM_USART_EVENT_RECEIVE_COMPLETE. On some occasions it does turn on the ARM_USART_EVENT_RECEIVE_COMPLETE bit.

What exactly is it timing out for, is it waiting for at terminating character? Data looks fine on the scope.

using - stm32f205
vision v5.06 build750
CMSIS V1.02

Parents
  • After some experimentation and examples found online I came to this conclusion.

    1) You need to set the size you expect in USARTdrv->Receive
    2) Most all examples always assume 1 charter in size.
    3) the doc implies you can set the designed size.
    4) No matter what the value you put in the driver will not allow more then 2.

    examples

    USARTdrv->Receive(&dataBuffer, 0); //fails
    USARTdrv->Receive(&dataBuffer, 1); //works when one char comes in
    USARTdrv->Receive(&dataBuffer, 2); //works when tow chars comes in
    USARTdrv->Receive(&dataBuffer, 2); //works when tow chars comes in, 3 trigger an over flow.

    It does not matter if it is in one sting of chanters or single characters, only 2 are premeditated. After the second an over flow is triggers and thusly ever charter after that also trigger an overflow. Not sure how you kill the receiver and wait for the next.

Reply
  • After some experimentation and examples found online I came to this conclusion.

    1) You need to set the size you expect in USARTdrv->Receive
    2) Most all examples always assume 1 charter in size.
    3) the doc implies you can set the designed size.
    4) No matter what the value you put in the driver will not allow more then 2.

    examples

    USARTdrv->Receive(&dataBuffer, 0); //fails
    USARTdrv->Receive(&dataBuffer, 1); //works when one char comes in
    USARTdrv->Receive(&dataBuffer, 2); //works when tow chars comes in
    USARTdrv->Receive(&dataBuffer, 2); //works when tow chars comes in, 3 trigger an over flow.

    It does not matter if it is in one sting of chanters or single characters, only 2 are premeditated. After the second an over flow is triggers and thusly ever charter after that also trigger an overflow. Not sure how you kill the receiver and wait for the next.

Children
No data