cherry-embedded / CherryDAP

CherryDAP is a DAPLink template based on CherryUSB and ARMmbed DAPLink.
https://cherrydap.cherry-embedded.org/
Apache License 2.0
146 stars 48 forks source link

[HSLink-Pro] fix delay issues for uart rx to usb #16

Closed Evlers closed 2 months ago

Evlers commented 2 months ago

问题描述

UART连续RX的时候,由于ringbuffer的写入是在IDLE中断或者DMA完成中断执行的,导致连续的数据接收会延迟给到USB

解决方案

main中循环检查DMA是否存在数据,存在则将数据写入到ringbuffer推送至USB