I'm testing DMA on P2020 board. In my test, I tried to move 32 bytes data from one memory address to another using DMA 1 channel 1 under basic direct mode. I've made sure that both the memory address are readable and writable. The steps I used is to set the src and dest location register and byte count register, then set CS bit in DMA_MR register. Unfortunately, after the CS bit has been set, the system seems to hang and the program doesn't proceed anymore. Note: DMA 1 channel 0 don't have this issue. (The OS I'm using is an ucos-like one with 1:1 MMU mapping.)
statusReg = *M85XX_DMAMR(CCSBAR, dmaChan);
*M85XX_DMAMR(CCSBAR, dmaChan) = (statusReg & DMAMR_CS_MASK) | DMAMR_CTM_DIRECT;
/* Start DMA */
*M85XX_DMAMR(CCSBAR, dmaChan) = statusReg | DMAMR_EOSIE | DMAMR_CS | DMAMR_CTM_DIRECT;
/* System hang after starting DMA !! */
Anyone has encountered the same issue before? Please help, thanks!