Developing the DMA memory-to-memory driver
Create a copy of your previous project in your IDE and rename it DMA_MemToMem
. Next, create a new file named dma.c
in the Src
folder and another file named dma.h
in the Inc
folder. Update your dma.c
file, as shown here:
#include "dma.h" #define DMA2EN (1U<<22) #define DMA_SCR_EN (1U<<0) #define DMA_SCR_MINC (1U<<10) #define DMA_SCR_PINC (1U<<9) #define DMA_SCR_TCIE (1U<<4) #define DMA_SCR_TEIE (1U<<2) #define DMA_SFCR_DMDIS (1U<<2) void dma2_mem2mem_config(void) { /*Enable clock access...