1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

LP-602 better fix for USB IRQ lockup issue

This commit is contained in:
Eric Price 2018-10-15 10:40:45 +02:00
parent 6ab58fe93d
commit 3f2d89fc11

View File

@ -681,7 +681,7 @@ static uint32_t DCD_WriteEmptyTxFifo(USB_OTG_CORE_HANDLE *pdev, uint32_t epnum)
}
// --- start fix
uint32_t fifoemptymsk;
if (len <= ep->maxpacket)
if (len < ep->maxpacket || ep->xfer_count==0)
{
// FIFO empty
fifoemptymsk = 0x1 << epnum;