diff --git a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c index c8026ef44..7a9a096cb 100644 --- a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c @@ -143,7 +143,7 @@ static size_t usb_packet_read_to_buffer(usbep_t ep, uint8_t *buf) { in which the next received packet will be stored, so we need to read the counter of the OTHER buffer, which is where the last received packet was stored.*/ - if (EPR_EP_TYPE_IS_ISO(epr) && !(epr & EPR_DTOG_RX)) + if (EPR_EP_TYPE_IS_ISO(epr) && ((epr & EPR_DTOG_RX) != 0U)) n = (size_t)udp->RXCOUNT1 & RXCOUNT_COUNT_MASK; else n = (size_t)udp->RXCOUNT0 & RXCOUNT_COUNT_MASK; diff --git a/readme.txt b/readme.txt index 6d1f4d092..eede19561 100644 --- a/readme.txt +++ b/readme.txt @@ -133,6 +133,8 @@ - NEW: Added SPIv2 support also to STM32WB and STM32WL. - FIX: Re-opened and fixed bug #1100 (backported to 20.3.5)(backported to 21.11.2). +- FIX: Fixed wrong buffers toggling in STM32 USBv1 isochronous mode (bug #1232) + (backported to 20.3.5)(backported to 21.11.2). - FIX: Fixed STM32 RTCv2 registers synchronization errata (bug #1231) (backported to 20.3.5)(backported to 21.11.2). - FIX: Fixed STM32 ADCv1 and ADCv5 do not allow prescaler divide value of 1