1、【优化】FreeModbus主机及从机串口中断部分源码,解决了大数据量通信偶尔会出现协议栈假死的情况。

Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
armink 2014-02-13 16:17:13 +08:00
parent 317f5180c7
commit 651d583527
2 changed files with 10 additions and 0 deletions

View File

@ -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)
{

View File

@ -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)
{