diff --git a/lib/libusb_stm32/src/usbd_stm32l433_devfs.c b/lib/libusb_stm32/src/usbd_stm32l433_devfs.c index 5b3f95381..c1463c377 100644 --- a/lib/libusb_stm32/src/usbd_stm32l433_devfs.c +++ b/lib/libusb_stm32/src/usbd_stm32l433_devfs.c @@ -336,7 +336,7 @@ static int32_t ep_read(uint8_t ep, void *buf, uint16_t blen) { } static void pma_write(const uint8_t *buf, uint16_t blen, pma_rec *tx) { - uint16_t *pma = (void*)(USB_PMAADDR + tx->addr); + volatile uint16_t *pma = (void*)(USB_PMAADDR + tx->addr); tx->cnt = blen; while (blen > 1) { *pma++ = buf[1] << 8 | buf[0];