问题
I'm a little bit confused about the cases in which CPU can direct transfer the data faster than DMA(Direct Memory Access Controller)? and vice-versa?
Thanks
回答1:
1 - CPU faster than DMA
CPU is idle. No task is running except yours (or your task has highest priority and the scheduling is priority scheduling) and Core interrupt is disabled (This will even stop the scheduling as there will be no timer tick interrupt). In that case, cpu transfer will be definitely faster than DMA as generally CPU gets faster clock than the Bus(AHB in ARM) clock which provides clock to DMA.
2 - DMA faster than CPU
In Normal system where there are always a few process running and interrupts are enabled which can cause delay as CPU will be running ISR frequently and will be jumping process context due to scheduling.
来源:https://stackoverflow.com/questions/43436562/in-what-cases-cpu-direct-transfer-works-faster-than-dma-in-what-cases-dma-trans