this is my DMA configuration for reading from flexbus (external SRAM) on K22:
DMA0->TCD.ATTR = DMA_ATTR_DSIZE(1) | DMA_ATTR_SSIZE(1);
DMA0->TCD.DOFF = 2;
DMA0->TCD.SOFF = 2;
DMA0->TCD.NBYTES_MLNO = 32;
DMA0->TCD.CITER_ELINKNO = 1;
DMA0->TCD.SADDR = flexbusAddress; // 0x08000000
DMA0->TCD.DADDR = mybuffer;
DMA0->TCD.CSR = DMA_CSR_START_MASK | DMA_CSR_INTMAJOR_MASK;
flexbusAddress variable is address pointing to flexbus memory space. I can read from flexbus using cpu anytime:
int *flex = flexbusAddress;
mybuffer = flex;
However, as soon as I launch DMA transfer I immediatelly get Source Bus Error in DMA0->ES register set.
Can you please help me with this issue?