how to clear buffer in usart1 lpc1768?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

how to clear buffer in usart1 lpc1768?

跳至解决方案
1,476 次查看
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?

标签 (1)
标记 (3)
1 解答
1,211 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
1,212 次查看
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,211 次查看
navidansari
Contributor III

thanks allot

0 项奖励