aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/USBv1
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD/USBv1')
-rw-r--r--os/hal/ports/STM32/LLD/USBv1/usb_lld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/USBv1/usb_lld.c b/os/hal/ports/STM32/LLD/USBv1/usb_lld.c
index c6ccc16da..3a97e123a 100644
--- a/os/hal/ports/STM32/LLD/USBv1/usb_lld.c
+++ b/os/hal/ports/STM32/LLD/USBv1/usb_lld.c
@@ -110,7 +110,7 @@ static uint32_t usb_pm_alloc(USBDriver *usbp, size_t size) {
uint32_t next;
next = usbp->pmnext;
- usbp->pmnext += size;
+ usbp->pmnext += (size + 1) & ~1;
osalDbgAssert(usbp->pmnext <= STM32_USB_PMA_SIZE, "PMA overflow");
return next;
}