From 72ceafac25aef159f3708d829cd9f5308a7c7910 Mon Sep 17 00:00:00 2001 From: deividAlfa <48562135+deividAlfa@users.noreply.github.com> Date: Sat, 18 Sep 2021 21:54:15 +0200 Subject: [PATCH] =?UTF-8?q?Declare=20DMA=20handler=20State=20as=20vol?= =?UTF-8?q?=C3=A1tile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not doing so causes issues when optimizations are enabled, the flag can change at any time by the DMA interrupt, but the compiler is unaware. --- Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h b/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h index 9a407f4..39ca574 100644 --- a/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h +++ b/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h @@ -116,7 +116,7 @@ typedef struct __DMA_HandleTypeDef HAL_LockTypeDef Lock; /*!< DMA locking object */ - HAL_DMA_StateTypeDef State; /*!< DMA transfer state */ + __IO HAL_DMA_StateTypeDef State; /*!< DMA transfer state */ void *Parent; /*!< Parent object state */