sushant_21
Junior Member level 3
Hi, this is sushant, i am trying to use CC1310F32 microcntroller for RF communication,
the hardware is custom, and i am trying to run one board in RF transmission mode and another in RF reception mode.
i got RF tx mode running , i have added UART debug output to check status.
but i am having problem while running the code for Rx, i have used the simple link example for rxpacket and txpacket.
following is initialization for RX mode
On UART terminal console, i can see output till this Enter Rx Mode, when i tried to debug useing JTAG debugger, debugger fails at this breakpoint
RF_EventMask terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx,
RF_PriorityNormal, &callback,
RF_EventRxEntryDone);
the hardware is custom, and i am trying to run one board in RF transmission mode and another in RF reception mode.
i got RF tx mode running , i have added UART debug output to check status.
but i am having problem while running the code for Rx, i have used the simple link example for rxpacket and txpacket.
following is initialization for RX mode
Code:
RF_Params rfParams;
RF_Params_init(&rfParams);
const char echoPrompt[] = "\n\rRF Rx example\r\n";
UART_Handle uart;
UART_Params uartParams;
UART_init();
UART_Params_init(&uartParams);
// uartParams.writeDataMode = UART_DATA_BINARY;
// uartParams.readDataMode = UART_DATA_BINARY;
// uartParams.readReturnMode = UART_RETURN_FULL;
// uartParams.readEcho = UART_ECHO_OFF;
uartParams.baudRate = 38400;
uart = UART_open(Board_UART0, &uartParams);
if (uart == NULL) {
/* UART_open() failed */
while (1);
}
UART_write(uart, echoPrompt, sizeof(echoPrompt));
// /* Open LED pins */
// ledPinHandle = PIN_open(&ledPinState, pinTable);
// if (ledPinHandle == NULL)
// {
// while(1);
// }
if( RFQueue_defineQueue(&dataQueue,
rxDataEntryBuffer,
sizeof(rxDataEntryBuffer),
NUM_DATA_ENTRIES,
MAX_LENGTH + NUM_APPENDED_BYTES))
{
/* Failed to allocate space for all data entries */
while(1);
}
UART_write(uart, "Queue Defined", strlen("Queue Defined"));
/* Modify CMD_PROP_RX command for application needs */
/* Set the Data Entity queue for received data */
RF_cmdPropRx.pQueue = &dataQueue;
/* Discard ignored packets from Rx queue */
RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1;
/* Discard packets with CRC error from Rx queue */
RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1;
/* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
RF_cmdPropRx.maxPktLen = MAX_LENGTH;
RF_cmdPropRx.pktConf.bRepeatOk = 1;
RF_cmdPropRx.pktConf.bRepeatNok = 1;
UART_write(uart, "\n\rOpen RF", strlen("\n\rOpen RF"));
/* Request access to the radio */
rfHandle = RF_open(&rfObject, &RF_prop,
(RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
// /* Set the frequency */
// RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
UART_write(uart, "\n\rEnter Rx Mode", strlen("\n\rEnter Rx Mode"));
/* Enter RX mode and stay forever in RX */
RF_EventMask terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx,
RF_PriorityNormal, &callback,
RF_EventRxEntryDone);
UART_write(uart, "\n\rRF_runCmd", strlen("\n\rRF_runCmd"));
/* Set the frequency */
RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
UART_write(uart, "\ninit done", strlen("\ninit done"));
On UART terminal console, i can see output till this Enter Rx Mode, when i tried to debug useing JTAG debugger, debugger fails at this breakpoint
RF_EventMask terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx,
RF_PriorityNormal, &callback,
RF_EventRxEntryDone);