Tool/software: TI-RTOS
Hi,
My application is always in RX WOR mode waiting for incoming data packets. However, I want to switch to TX mode whenever I press a button, this will transmit a data packet to another CC1310 in WOR RX mode. After the packet is transmitted, it returns back to RX WOR mode again until another button press.
In the WOR RX example, the rxTaskFunction has a main loop running. I understand that this main loop wakes up to check for incoming packets.
/* Enter main loop */ while(1) { /* Set next wakeup time in the future */ RF_cmdPropRxSniff.startTime += WOR_WAKE_UP_INTERVAL_RAT_TICKS(WOR_WAKEUPS_PER_SECOND); /* Schedule RX */ RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRxSniff, RF_PriorityNormal, &RFcallback, RF_EventRxEntryDone); /* Log RX_SNIFF status */ switch(RF_cmdPropRxSniff.status) { case PROP_DONE_IDLE: /* Idle based on RSSI */ worStatistics.doneIdle++; break; case PROP_DONE_IDLETIMEOUT: /* Idle based on PQT */ worStatistics.doneIdleTimeout++; break; case PROP_DONE_RXTIMEOUT: /* Got valid preamble on the air, but did not find sync word */ worStatistics.doneRxTimeout++; break; case PROP_DONE_OK: /* Received packet */ worStatistics.doneOk++; break; default: /* Unhandled status */ break; }; }
I have setup a hardware interrupt to trigger when a button is press, but I don't know how to continue. How do I stop the main RX loop, change to TX mode, send out a packet and switch back to RX mode again? Can someone advise on this? Thanks in advance!