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.

RTOS/CC1310: CC1310 Uart, TX, RX all together not working ?

Part Number: CC1310

Tool/software: TI-RTOS

I need to write a code like that:

1) Always RX mode open.

2) When RX get the data, TX mode open and transmit what is incoming data from RX.

3) When data come from UART, TX mode open and transmit the data.

I sent the code I wrote.  

Code not working according to the above conditions.

When Uart disable, its working or when Rx disable Uart and Tx work. 

All together sadly not working.rfPacketRx_Tx_Uart.rar

Please suggest a way. 

  • Hello eyupcakar,
    From your code, I see that Rx cmd is not cancelled before you run Tx. Once data is received on the UART, you need to first cancel Rx before running Tx.
    Also when you successfully receive a packet, you need to post Tx task in Rx callback since you want to transmit the Rx packet. Below is the summary of the changes you need.
    2. When a packet is received, copy rx data into tx packet, cancel Rx command, post tx semaphore to run Tx. After Tx task is complete, post Rx sepahore to switch back to Rx.
    3. When there is UART data, cancel Rx, then semaphore_post tx task and after tx tasks is complete, post Rx semaphore to switch back to Rx.

    Regards,
    Prashanth
  • Hi Prashanth,

    I did all the change in the code. please check what is wrong. I'm in task priority or somethink like semaphores. I don't figure out.

    Please tell me.

    Regards.

    Here is code:rfPacketRxtx_uart_modify.rar 

  • Hello Eyupcakar,
    I see a few problems in your code. In the txTaskFunction, you are pending the semaphores in the beginning of the function and not in the while(1) loop. You should move those into the while(1) loop. You can refer to the TI_RTOS training videos to understand more about Tasks and semaphores.
    Also since you wanted to transmit the received packet, use memcpy to copy the complete packet array. Your code on line 467 will only copy one element and not the whole array.
    Also cancel the rfRxCmd after the semaphore_pend statements in the while(1) loop and not before.
    Regards,
    Prashanth