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.

TMS320F28335: MCBSP设置为SPI时,发送数据此寄存器McbspbRegs.SPCR2.bit.XRDY一直为0

Part Number: TMS320F28335

程序运行时,一直在等待发送寄存器为空这里循环

Uint16 Mcbsp_SPI_Byte(Uint16 data)
{

    // 等待发送寄存器为空
    while(McbspbRegs.SPCR2.bit.XRDY != 1);
    // 向发送寄存器写入数据
    McbspbRegs.DXR1.all = data;

    // 等待接收就绪
    while(McbspbRegs.SPCR1.bit.RRDY != 1);
    return McbspbRegs.DRR1.all;


}