How many AHB cycle required to perform memory to memory DMA after EN bit enabled?
How many AHB cycle required to perform memory to memory DMA after EN bit enabled?
I'm checking the STM32F4xx_DSP_StdPeriph_Lib_V1.8.0\Project\STM32F4xx_StdPeriph_Examples\DMA\DMA_FLASHToRAM example and after the DMA is enabled there are some code which inits the NVIC controller. So I think at least 20-50 cycle needed before starting the mem to mem copy (or the copy has itself delay)
/* DMA Stream enable */
DMA_Cmd(DMA_STREAM, ENABLE);/* Check if the DMA Stream has been effectively enabled.
The DMA Stream Enable bit is cleared immediately by hardware if there is an error in the configuration parameters and the transfer is no started (ie. when wrong FIFO threshold is configured ...) */ Timeout = TIMEOUT_MAX; while ((DMA_GetCmdStatus(DMA_STREAM) != ENABLE) && (Timeout-- > 0)) { } /* Check if a timeout condition occurred */ if (Timeout == 0) { /* Manage the error: to simplify the code enter an infinite loop */ while (1) { } }/* Enable the DMA Stream IRQ Channel */
NVIC_InitStructure.NVIC_IRQChannel = DMA_STREAM_IRQ; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); }