diff --git a/stmhal/dma.c b/stmhal/dma.c index 60d7b0210c..df40cc696d 100644 --- a/stmhal/dma.c +++ b/stmhal/dma.c @@ -436,6 +436,7 @@ void dma_init(DMA_HandleTypeDef *dma, const dma_descr_t *dma_descr, void *data){ HAL_NVIC_SetPriority(dma_irqn[dma_id], IRQ_PRI_DMA, IRQ_SUBPRI_DMA); } else { // only necessary initialization + dma->State = HAL_DMA_STATE_READY; #if defined(MCU_SERIES_F4) // calculate DMA base address and bitshift to be used in IRQ handler extern uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma);