diff --git a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c index 455c1c77e..6d2450de9 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c @@ -515,11 +515,11 @@ static bool otg_txfifo_handler(USBDriver *usbp, usbep_t ep) { n); usbp->epc[ep]->in_state->mode.linear.txbuf += n; } - usbp->epc[ep]->in_state->txcnt += n; - } #if STM32_USB_OTGFIFO_FILL_BASEPRI __set_BASEPRI(0); #endif + usbp->epc[ep]->in_state->txcnt += n; + } } /**