You are here

UART_GetByte() does not retrun anything | Cypress Semiconductor

UART_GetByte() does not retrun anything

Summary: 3 Replies, Latest post by Bob Marlowe on 23 Sep 2016 04:11 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
surya_1493556's picture
User
9 posts

I working with the PRoC BLE as a central device,My project is to receive the data from the UART and send it through BLE...for few iteration the normal flow goes well, after some time on UART_GetByte() the normal flow gets stopped. Please let me know how to overcome this issue.

-Surya

user_1377889's picture
User
10104 posts

Since I cannot see that issue from here, can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

 

Bob

 

surya_1493556's picture
User
9 posts

I have attached my project please check out.

user_1377889's picture
User
10104 posts

I cannot see how much input is coming into the UART, but as I can see you are printing ~20 times the number of characters you receive. Additionally you have a delay of 50ms in the character receive part. This might lead to Rx overflows that might not be printed as you want, because you clear the Rx buffer.

I would suggest you to

  • Remove your interrupts from UART, you are not using them
  • Remove the delay in the receive loop
  • Remove as much of the printf() as possible out of the receive loop.

Using printf() is comparably slow. Using sprintf() and UART_PutString() works much faster.

 

Bob

Log in to post new comments.