From 2a0bc2d07ff777f97e7b9869f1cda1b0c411779f Mon Sep 17 00:00:00 2001 From: bkleiner Date: Thu, 2 May 2024 01:41:39 +0200 Subject: [PATCH] libusb: fix pma_write for g4 --- lib/libusb_stm32/src/usbd_stm32l433_devfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];