how to clear buffer in usart1 lpc1768?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to clear buffer in usart1 lpc1768?

Jump to solution
1,386 Views
navidansari
Contributor III

hi

i have RS485 that when i enable transmit pin of it and send data its ok but when i want receive something  and enable Receive pin cause my usart buffer to fill up whit something that corrupt what i want receive.

how can i clear usart1 buffer of lpc1768 after every transmit to be ready to receive something?

Labels (1)
Tags (3)
1 Solution
1,121 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello navid ansari,

    About the LPC1768 UART1 485,  we have the according sample code for your reference.

   I have attached it, please refer to the sample code directly.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
1,122 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello navid ansari,

    About the LPC1768 UART1 485,  we have the according sample code for your reference.

   I have attached it, please refer to the sample code directly.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,121 Views
navidansari
Contributor III

thanks allot

0 Kudos