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.

CC1312R: RF_cmdPropRx 的callback 函数中调用UART_write问题

Part Number: CC1312R

char RX_PER[7] = {0xAA,0x55,0x03,0x09,0x00,0x00,0x55}; 

terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx,
RF_PriorityNormal, &callback,

void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
if (e & RF_EventRxEntryDone)

/* Get current unhandled data entry */
currentDataEntry = RFQueue_getDataEntry();

/* Handle the packet data, located at &currentDataEntry->data:
* - Length is the first byte with the current configuration
* - Data starts from the second byte */
packetLength = *(uint8_t*)(&currentDataEntry->data);
packetDataPointer = (uint8_t*)(&currentDataEntry->data + 1);

/* Copy the payload + the status byte to the packet variable */
memcpy(packet, packetDataPointer, (packetLength + 1));

for(int j=0;j<7;j++)
UART_write(uart,&RX_PER[j],1); //问题:为什么这里只能打印出RX_PER[0]就停了?



问题1:使用RF_cmdPropRx时,接收到数据后进入callback函数,在callback函数中调用UART_write,只能执行一次,即for(int j=0;j<7;j++)
UART_write(uart,&RX_PER[j],1); 只打印出了0XAA。我要怎样才能实现打印出RX_PER数组;


terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx,RF_PriorityNormal, &callback,RF_EventRxEntryDone);重新进入RF_cmdPropRx;