Declare DMA Handler State as volatile

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.
This commit is contained in:
deividAlfa 2021-09-18 22:00:05 +02:00 committed by Ali LABBENE
parent 156741e067
commit 218b5100dd
1 changed files with 1 additions and 1 deletions

View File

@ -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 */