TI中文支持网
TI专业的中文技术问题搜集分享网站

CC1110用DMA方式配置完,发送一串数据,前面几个字节对的,后面几个字节接收到的不一样了(不知道哪里的没有配置好),请帮忙看看,谢谢

dmaConfig.PRIORITY = DMA_PRI_HIGH;
dmaConfig.M8 = DMA_M8_USE_8_BITS;
dmaConfig.IRQMASK = DMA_IRQMASK_DISABLE;
dmaConfig.TRIG = DMA_TRIG_RADIO;
dmaConfig.TMODE = DMA_TMODE_SINGLE;
dmaConfig.WORDSIZE = DMA_WORDSIZE_BYTE;

if (radio_mode == RADIO_MODE_TX) {

dmaConfig.SRCADDRH = (BYTE)(((UINT16)&radioPktBuffer >> 8) & 0x00FF);
dmaConfig.SRCADDRL = (BYTE)(((UINT16)&radioPktBuffer) & 0x00FF);

dmaConfig.DESTADDRH = (BYTE)(((UINT16)&X_RFD >> 8) & 0x00FF); 
dmaConfig.DESTADDRL = (BYTE)(((UINT16)&X_RFD) & 0x00FF); 

dmaConfig.VLEN = DMA_VLEN_FIRST_BYTE_P_1;
dmaConfig.LENH = (BYTE)(((UINT16)(PACKET_LENGTH + 1) >> 8) & 0x00FF); 
dmaConfig.LENL = (BYTE)((UINT16)(PACKET_LENGTH + 1) & 0x00FF);

dmaConfig.SRCINC = DMA_SRCINC_1;
dmaConfig.DESTINC = DMA_DESTINC_0;
}
else if (radio_mode == RADIO_MODE_RX) {

dmaConfig.SRCADDRH = (BYTE)(((UINT16)&X_RFD >> 8) & 0x00FF);
dmaConfig.SRCADDRL = (BYTE)(((UINT16)&X_RFD) & 0x00FF);

dmaConfig.DESTADDRH = (BYTE)(((UINT16)&radioPktBuffer >> 8) & 0x00FF);
dmaConfig.DESTADDRL = (BYTE)(((UINT16)&radioPktBuffer) & 0x00FF); 

dmaConfig.VLEN = DMA_VLEN_FIRST_BYTE_P_3;
dmaConfig.LENH = (BYTE)(((UINT16)(PACKET_LENGTH + 3) >> 8) & 0x00FF);
dmaConfig.LENL = (BYTE)(((UINT16)(PACKET_LENGTH + 3) & 0x00FF));

dmaConfig.SRCINC = DMA_SRCINC_0;
dmaConfig.DESTINC = DMA_DESTINC_1;
}

DMA0CFGH = (BYTE)(((UINT16)&dmaConfig >> 8) & 0x00FF);
DMA0CFGL = (BYTE)(((UINT16)&dmaConfig) & 0x00FF);

Viki Shi:

配置CC1110的DMA模式请参考DN107:www.ti.com/…/swra164a.pdf

user5922715:

回复 Viki Shi:

好的,谢谢

赞(0)
未经允许不得转载:TI中文支持网 » CC1110用DMA方式配置完,发送一串数据,前面几个字节对的,后面几个字节接收到的不一样了(不知道哪里的没有配置好),请帮忙看看,谢谢
分享到: 更多 (0)