Skip to content

Commit 3f2d89f

Browse files
committed
LP-602 better fix for USB IRQ lockup issue
1 parent 6ab58fe commit 3f2d89f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • flight/pios/stm32f4xx/libraries/STM32_USB_OTG_Driver/src

flight/pios/stm32f4xx/libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static uint32_t DCD_WriteEmptyTxFifo(USB_OTG_CORE_HANDLE *pdev, uint32_t epnum)
681681
}
682682
// --- start fix
683683
uint32_t fifoemptymsk;
684-
if (len <= ep->maxpacket)
684+
if (len < ep->maxpacket || ep->xfer_count==0)
685685
{
686686
// FIFO empty
687687
fifoemptymsk = 0x1 << epnum;

0 commit comments

Comments
 (0)