Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

RTOS/LAUNCHXL-CC1310: EasyLink_receive() busy error

$
0
0

Part Number:LAUNCHXL-CC1310

Tool/software:TI-RTOS

Hello there,

I currently have the following setup: a mainTask that is just a clock that calls a ADC function every 10 seconds. If the adc function returns a specific value, I post a semaphore to a TX task to transmit it. Right that after I post another semaphore for a RX function to receive an ack. I am testing the whole thing and it seems to work fine until the RX. I keep getting a EasyLink_Status_Busy_Error while I should be getting a EasyLink_Status_Rx_Timeout. Can someone help me? I'll post the relevant pieces of the code.

The main clock task is:

void mainTask(UArg arg0, UArg arg1) {
	unsigned int adcFlag;
	UInt32 time;
	adcFlag = adcFxn();
	if(adcFlag == 1){
		Semaphore_post(semTxHandle);
	}
	if(resultTX == 0){
		Semaphore_post(semRxHandle);
	}
		
	time = Clock_getTicks();
	System_printf("\ntime: %u\nadcFlag: %u\nresultTX: %u\nresultRX: %u\n",time,adcFlag,resultTX,resultRX);
	System_flush();
	Clock_setTicks(0);
}

The TX task is:

void txTask(UArg arg0, UArg arg1) {
	//static int queuePos;
    //EasyLink_init(EasyLink_Phy_Custom);
	EasyLink_init(EasyLink_Phy_625bpsLrm);
	EasyLink_setFrequency(915000000);
    EasyLink_setRfPwr(14);
    static unsigned int count = 0;
    while(1){
    	Semaphore_pend(semTxHandle, BIOS_WAIT_FOREVER);
    	if(vStatus == 1){
    		txPacket.len = TX_PAYLOAD_LENGTH;
    		txPacket.absTime = 0;
      		//txPacket.dstAddr[0] = 0xaa;
    		txPacket.payload[0] = 0;//txPacket.dstAddr[0];
    		txPacket.payload[1] = count++;//EasyLink_getRfPwr();
    		
                /* and on until the packet is done */

    		resultTX = EasyLink_transmit(&txPacket);
                }
    	}
}


The RX task is:

void rxTask(UArg arg0, UArg arg1) {
	Semaphore_pend(semRxHandle,BIOS_WAIT_FOREVER);
	//EasyLink_init(EasyLink_Phy_Custom);
	EasyLink_init(EasyLink_Phy_625bpsLrm);
	EasyLink_setFrequency(915000000);
	EasyLink_RxPacket rxPacket = {0};
	rxPacket.rxTimeout = 100000;
	rxPacket.len = RX_MAX_DATA_SIZE;
	rxPacket.absTime = 100;
	resultRX = EasyLink_receive(&rxPacket);
}

THanks in advance for any help.

Pedro

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>