CY7C65215 UART Monitor RX Line Data

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ShYa_2805961
Level 3
Level 3
First like received First like given

Hello,

I am using CY7C65215 USB to UART function, and I want to use UART mode to monitor UART RX line messages(2-line mode). But I don't know use which one API function.

     I saw CyUartRead Function, but I think it only can monitor some time, not always. I mean I want to monitor RX Line always, until my command close this function.Do you know how to implement it?

     if I recall this function by cycles, I afraid I may lost some messages when cycle space. waiting for your ideas.

0 Likes
1 Solution

Hello Shijie,

Once the function CyUartRead is called, the function will not return until either the buffer is completely filled with data or there is a timeout.

In your case when the length of the buffer is mentioned as 80, the API CyUartRead will return as soon as it receives 80 bytes of data, even when you send more that 80 bytes the function will not consider the rest and hence the transfer count is updated to 80.

Consider this case, the length of the buffer is mentioned as 1000 and time out is mentioned as 5000. In this case when the device(/API) receives only 99 bytes of data and there is a timeout condition, the API will return a timeout error CY_ERROR_IO_TIMEOUT but the transfer count will be updated to 99 and the buffer will be filled with the received 99 bytes of data.

In case if you want to continuously receive data from the UART and display it, you can use UART in CDC mode and an application like tera term for capturing and displaying the data. Please refer to section 3.3.3 UART Configuration from CYUSBS236 DVK User Guide.

Best Regards,

Yatheesh

View solution in original post

0 Likes
7 Replies