This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
参考一个McBSP的例子,AFIFO使能,对EDMA的设置也修改了
void EDMA_Config(int dmaCh, Uint32 srcAddr, Uint32 dstAddr, Uint32 a, Uint32 b, Uint32 c,Uint32 bInput)
#define L138_McASP0_DATA_Reg 0x01D02000
EDMA_Config(0, L138_McASP0_DATA_Reg, dma_mem_alloc((AdNum-1)*sizeof(int)*PCM_SAMPLE_NUM*2*2), sizeof(int), (AdNum-1), PCM_SAMPLE_NUM*2, TRUE);
EDMA_Config(1, dma_mem_alloc((DaNum-1)*sizeof(int)*PCM_SAMPLE_NUM*2*2), L138_McASP0_DATA_Reg, sizeof(int), (AdNum-1), PCM_SAMPLE_NUM*2, FALSE);
本来channel0的源地址和channel1的目标地址为接收缓存器[0]和发送缓存器[1]地址,修改前后都数据搬运都不成功,而且EDMA中断都进不了,我的理解是,不管edma的源地址或目标地址有没有设置正确,McASP接收或者是发送完一个slot的数据,必定会引起触发事件,在AB同步传输中,只要触发C次后,就会进入一次中断。现在的结果我自己理解为,使能AFIFO后,就没有产生触发事件了。
观察状态寄存器的值:RDTDA(Receive data ready flag)=1,RSTAFRM(Receive start of frame flag)=1