C6205的DMA寄存器配置如下:
DMA_Config MyDMAConfig = {
0x0B0002FF,//0x09000050, /* prictl */
0x00000008,//0x000000A8, /* secctl */
0x01400000, /* src */
0x80000400, /* dst */
0x00010001 /* xfrcnt */
};
Uint32 dmaGblRegMsk;
Uint32 dmaGblRegId = DMA_GBLADDRB | DMA_GBLADDRC | DMA_GBLIDXA | DMA_GBLCNTA;
DMA_GlobalConfig dmaGblCfg = {
0x00000000, /* Global Address Register A */
0x01400000, /* Global Address Register B */
0x80000400, /* Global Address Register C */
0x00000000, /* Global Address Register D */
0x00010000, /* Global Index Register A */
0x00000000, /* Global Index Register B */
0x00010001, /* Global Count Reload Register A */
0x00000000 /* Global Count Reload Register B */
};
初始化如下:
dmaGblRegMsk = DMA_globalAlloc(dmaGblRegId);
DMA_globalConfig(dmaGblRegMsk, &dmaGblCfg);
hDma = DMA_open(DMA_CHA0,DMA_OPEN_RESET);
DMA_config(hDma,&MyDMAConfig);
DMA_autoStart(hDma);
源地址0x01400000通过EMIF接口外接8位norflash
现在的问题是:
程序每次进中断,应该搬移1字节数据吧?现在的测试结果是初次搬移7字节,后续每次搬19字节,请问哪块配置有问题?