From 651d583527cd6b4f96afdd0e46b123c647c410da Mon Sep 17 00:00:00 2001 From: armink Date: Thu, 13 Feb 2014 16:17:13 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91F?= =?UTF-8?q?reeModbus=E4=B8=BB=E6=9C=BA=E5=8F=8A=E4=BB=8E=E6=9C=BA=E4=B8=B2?= =?UTF-8?q?=E5=8F=A3=E4=B8=AD=E6=96=AD=E9=83=A8=E5=88=86=E6=BA=90=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E4=BA=86=E5=A4=A7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=8F=E9=80=9A=E4=BF=A1=E5=81=B6=E5=B0=94=E4=BC=9A=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=8D=8F=E8=AE=AE=E6=A0=88=E5=81=87=E6=AD=BB=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: armink --- FreeModbus/port/portserial.c | 5 +++++ FreeModbus/port/portserial_m.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/FreeModbus/port/portserial.c b/FreeModbus/port/portserial.c index 62bf50a..1013980 100644 --- a/FreeModbus/port/portserial.c +++ b/FreeModbus/port/portserial.c @@ -178,6 +178,11 @@ void prvvUARTRxISR(void) void USART1_IRQHandler(void) { rt_interrupt_enter(); + //溢出错误 + if (USART_GetFlagStatus(USART1, USART_FLAG_ORE) == SET) + { + prvvUARTRxISR(); + } //接收中断 if (USART_GetITStatus(USART1, USART_IT_RXNE) == SET) { diff --git a/FreeModbus/port/portserial_m.c b/FreeModbus/port/portserial_m.c index 461228a..863e912 100644 --- a/FreeModbus/port/portserial_m.c +++ b/FreeModbus/port/portserial_m.c @@ -179,6 +179,11 @@ void prvvUARTRxISR(void) void USART2_IRQHandler(void) { rt_interrupt_enter(); + //溢出错误 + if (USART_GetFlagStatus(USART2, USART_FLAG_ORE) == SET) + { + prvvUARTRxISR(); + } //接收中断 if (USART_GetITStatus(USART2, USART_IT_RXNE) == SET) {