Skip to content

Commit

Permalink
[hal/gd32h7xx/usart] clear overrun error which is enabled by rxfifo n…
Browse files Browse the repository at this point in the history
…ot empty interrupt
  • Loading branch information
versaloon committed Oct 8, 2024
1 parent 204806d commit 2df1699
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/hal/driver/GigaDevice/GD32H7XX/common/usart/usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ static void VSF_MCONNECT(__, VSF_USART_CFG_IMP_PREFIX, _usart_irqhandler)(
| ((irq_mask_orig & USART_STAT_PERR) << 8)
| ((irq_mask_orig & USART_STAT_CTSF) << 1);

// ORERR can be triggered if RFNEIE is enabled
USART_INTC(reg) = USART_INTC_OREC;
if ((irq_mask != 0) && (isr_ptr->handler_fn != NULL)) {
isr_ptr->handler_fn(isr_ptr->target_ptr, (vsf_usart_t *)usart_ptr, irq_mask);
}
Expand Down

0 comments on commit 2df1699

Please sign in to comment.