System hang when DMA xfer is started

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

System hang when DMA xfer is started

1,501 Views
yunyuaner
Contributor I

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!

Tags (2)
0 Kudos
Reply
1 Reply

1,443 Views
ufedor
NXP Employee
NXP Employee

Please use a debugger and provide additional information:

1) at which position in the code the processor is stuck?

2) capture dump of the initialized DMA channel registers immediately before the channel start.

0 Kudos
Reply