调用DMA函数如下
EDMA3CCPaRAMEntry Edma3Param[4];uint32_t Edma3Param_chNum[4];uint32_t Edma3Param_tccNum[4];uint32_t Edma3Param_evtQNum[4];void Edma3Transfer_2(uint8_t num,uint32_t srcaddr,uint32_t dstaddr){Edma3Param_chNum[num]= num;Edma3Param_tccNum[num] = num;Edma3Param_evtQNum[num] = num;Edma3Param[num].srcAddr = srcaddr;Edma3Param[num].destAddr = dstaddr;Edma3Param[num].aCnt= 16384;Edma3Param[num].bCnt= 16;Edma3Param[num].cCnt= 1;Edma3Param[num].srcBIdx = 16384;Edma3Param[num].destBIdx = 16384;Edma3Param[num].srcCIdx = 0;Edma3Param[num].destCIdx = 0;Edma3Param[num].linkAddr = 0xFFFF;EDMA3Init(0x02740000,Edma3Param_evtQNum[num]);EDMA3RequestChannel(0x02740000,EDMA3_CHANNEL_TYPE_DMA,Edma3Param_chNum[num],Edma3Param_tccNum[num],Edma3Param_evtQNum[num]);EDMA3SetPaRAM(0x02740000,Edma3Param_chNum[num],&Edma3Param[num]);EDMA3EnableTransfer(0x02740000,Edma3Param_chNum[num],EDMA3_TRIG_MODE_MANUAL);}
主函数中调用如下
HW_WR_REG32(0x02742070,0x00000008); //在每次传输前,手动清下TC标志位Edma3Transfer_2(3,0x80000000,0x10840000);//进行数据传输while((HW_RD_REG32(0x02742068) & 0x00000008) == 0x00000000);//等待数据传输完成
请问各位TI工程师,我在调试时DMA只传输了4096个数据,也就是只传输了一帧,这是为什么?
Tao_LL:
地址改为0x10800000就可以传输16帧了,L2里头其它地址就不可以。。
Tao_LL:
回复 Shine:
错误原因没找到,但传到变量中没问题,可以用这个解决问题。