TMS3202812与TLV320AIC23通讯 aic23配置成dsp模式 以下部分代码 程序没问题 有不解之处 请好汉指导(完整工程在附件)
void InitMcbsp(void)
{
EALLOW;
GpioMuxRegs.GPFMUX.all = 0x3fff;
EDIS;
McbspRegs.SPCR1.all = 0x0000;
McbspRegs.SPCR2.all = 0x0220;
McbspRegs.PCR1.all = 0x0001;
McbspRegs.XCR1.all =0x0140;
McbspRegs.XCR2.all = 0x0004;
McbspRegs.RCR1.all = 0x0140;
McbspRegs.RCR2.all = 0x0004;
delay(100);
McbspRegs.DXR1.all = 0;
McbspRegs.MFFINT.bit.RINT = 1;
McbspRegs.MFFINT.bit.XINT = 1;
McbspRegs.SPCR1.bit.RRST = 1;
McbspRegs.SPCR2.bit.XRST = 1;
delay(100);
}
主函数中断响应
interrupt void ISRMcbspX(void)
{
PieCtrl.PIEACK.all = 0xFFFF;
PieCtrl.PIEIFR6.bit.INTx6 =0;
McbspRegs.DXR1.all = y; //警报声
IER |= M_INT6;
EINT;
ERTM;
}
疑惑之处:(时钟帧频率由AIC23提供)每帧配置一个相位 ,2个16位字 ,在新帧到来产生中断 ,而在中断中只进行了一次赋值,个人觉得既然每帧两字应该每产生中断赋值两次 ,当每帧多个相位又该怎样发送 求解??? |