Setup Code

Add these macros and global variable to the top of your application's C-file:
#define DMA_CH 0
#define DMA_BUF_SIZE    32

uint32_t g_dma_buf[6][DMA_BUF_SIZE];
Add this to the main loop or a setup function:
pmc_enable_periph_clk(ID_DMAC);