UART_GetByte() does not retrun anything

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

cross mob
Anonymous
Not applicable

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

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I have attached my project please check out.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes