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.

关于CC1110F32 TX程序

Other Parts Discussed in Thread: CC1101

下面是无线发送程序的代码,当执行代码时,STX()命令后,能够进入RFTXRXIF中断,

当执行到 “<---代码循环”这行代码时,RFTXRXIF不再置1,同时,IRQ_DONE和IRQ_TXUVF置1,

从而导致程序进入死循环状态。请问这种情况是何种原因?如何处理?谢谢!

// Turning on radio and writing data including length;
RFTXRXIF = 0;
RFIF &= ~IRQ_DONE;
STX();
while(RFTXRXIF == 0);
RFTXRXIF = 0;
RFD = length;

// Inserting data
for(i = 0 ; i < length ; i++){
while(RFTXRXIF == 0);                <---代码循环
RFTXRXIF = 0;
RFD = pData[i];
}

// Waitting for transmission to finish
while(!(RFIF & IRQ_DONE));
RFIF &= ~IRQ_DONE;
SIDLE();