This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
在28069上运行官方Demo: scia_loopback_interrupts, 一切正常,其中 TXFFIL = 2, RXFFIL =2, 使用了2级深度。
28069 FIFO深度为4级,修改程序使用3级,4级深度后,接收数据都不正确, 比如,sdataA中值为0,1,2,3, 接收到的rdataA永远为最后一个字节:3,3,3,3
#define _FifoL 4
Uint16 sdataA[_FifoL];
Uint16 rdataA[_FifoL];
for(i = 0; i < _FifoL; i++)
sdataA[i] = i;
scia_fifo_init中:
SciaRegs.SCIFFTX.all=0xC020|_FifoL;
SciaRegs.SCIFFRX.all=0x0020|_FifoL;
__interrupt void sciaTxFifoIsr(void){
Uint16 i;
for(i=0; i< _FifoL; i++)
SciaRegs.SCITXBUF=sdataA[i];
SciaRegs.SCIFFTX.bit.TXFFINTCLR=1;
PieCtrlRegs.PIEACK.all|=0x100;
}
__interrupt void sciaRxFifoIsr(void){
Uint16 i;
for(i = 0; i < _FifoL; i++)
rdataA[i]=SciaRegs.SCIRXBUF.all;
SciaRegs.SCIFFRX.bit.RXFFOVRCLR=1;
SciaRegs.SCIFFRX.bit.RXFFINTCLR=1;
PieCtrlRegs.PIEACK.all|=0x100;
}
其它地方都没动过,请问是什么原因? 请赐教。