大家好,请教个问题:
我用EPWM1.SOCA触发DMA操作,DMA操作的目的地址是SPI的发送寄存器,数据宽度16bit,DMA配置如下:
#define BURST 0
#define TRANSFER 10
#pragma DATA_SECTION(pingBuf, "ramgs0");
#pragma DATA_SECTION(pongBuf, "ramgs1");
//
// Initialize DMA
//
DMAInitialize();
// Initialize DMA
//
DMAInitialize();
//
// configure DMACH1 for TX
//
DMACH1AddrConfig(&SpiaRegs.SPITXBUF,pingBuf);
DMACH1BurstConfig(BURST,1,0); // Burst size, src step, dest step,BURST:inner loop,the size transferred one time
DMACH1TransferConfig(TRANSFER,0,0); // transfer size, src step, dest step.TRANSFER:outer loop,defined how many BURST are performed in the entire transffer
DMACH1ModeConfig(DMA_EPWM1A,PERINT_ENABLE,ONESHOT_DISABLE,CONT_ENABLE,
SYNC_DISABLE,SYNC_SRC,OVRFLOW_DISABLE,SIXTEEN_BIT,
CHINT_END,CHINT_ENABLE);
// configure DMACH1 for TX
//
DMACH1AddrConfig(&SpiaRegs.SPITXBUF,pingBuf);
DMACH1BurstConfig(BURST,1,0); // Burst size, src step, dest step,BURST:inner loop,the size transferred one time
DMACH1TransferConfig(TRANSFER,0,0); // transfer size, src step, dest step.TRANSFER:outer loop,defined how many BURST are performed in the entire transffer
DMACH1ModeConfig(DMA_EPWM1A,PERINT_ENABLE,ONESHOT_DISABLE,CONT_ENABLE,
SYNC_DISABLE,SYNC_SRC,OVRFLOW_DISABLE,SIXTEEN_BIT,
CHINT_END,CHINT_ENABLE);
但实际测量下来:
1)DMA可以成功触发;
2)TRANSFER参数设置生效;
3)DMACH1BurstConfig(BURST,1,0); 设置中参数1未生效,TRANSFER个bust传输中,每次发送的数据都是一样的,就是说原地址每次传输完成后没有执行加一运算。
请问这个和什么有关呢?