This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

uart rx idle

Is exist any way to detect IDLE RX line on UART?

I try to use RXTO but this is seted each time when 1 byte comes.

everytime, it changed size of data which will be readed.

Parents Reply
  • Hi 

    I am a bit unsure I understand the question correctly. In general you should expect to get a timeout after the last bytes of the transaction has been received, as there will be no more data coming over the UART. 

    If you want to ensure that you receive the entire message in one callback you should make sure the RX buffer is larger than the maximum packet size you expect. 

    Otherwise you simply have to buffer the data in the application, and wait until all the bytes are received before processing the data. 

    Best regards
    Torbjørn

Children
Related