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: RF- UART COMMUNICATION

Part Number: CC1310
Other Parts Discussed in Thread: CC1350, CC1190

Tool/software: TI-RTOS

Hello everybody 

I want to make a project with cc1310.

It needs to work like that it waits for uart data and if data comes it sends data with RF to other devices. Also it could take rf data and print it to consol.Basiclly i want to create 1 kind of board that can do all of this .

I have used  's project for that at the link below.

e2e.ti.com/.../2223353

I couldnt work the project .I could build without error and I debug and see at ROV the tasks mode is ready but it doesnt work.

any help would be great.

And also i want to say i tried this code receiver and transmitter parts separate and it works.

I send data via uart one board and it sends with rf to the other one

and the other one reads rf data and prints data  to consol with uart.

But I need them work together .

  • Hi, you say that in ROV task mode is ready. Have you checked if the stackPeak is not exeeded? Have you tried the BIOS->'Scan for errors' to check if the RTOS is in a bad state (e.g. blown stacks, corrupted data because of bad application pointers or buffer overflows, etc.)?
  • Hello EMRE,
    What boards are you using? The project should work as is on CC1350 and CC1310 launchpads with both receiver and transmitter together in the same project. If it is not, can you try replacing the board files with the correct files.
    Regards,
    Prashanth
  • Hi PrashanthS,
    I managed to run project.The problem was caused by the program I was using for serial monitoring.When I changed it with coolterm,I managed to control boards .Could you briefly explain why?
    Thanks for the help,
    Regards,
    EMRE
  • Hello EMRE, 

    Good to hear that it is now working. I used coolterm for my tests. What serial program were you using when it was not working? Did you have the same serial port setup as coolterm? 

    Regards,

    Prashanth

  • Hi PrashanthS,

    I was using HTERM for serial .There is no Local echo feature unlike coolterm.
    I also want to say that I am using TTL converter for communication and I see the communication led flashing indicating that the information is being transmitted.But board doesnt reply .when I use HTERM.

    I am working with a custom board . I managed to communicate boards with this project.There are a few problems I encountered.

    1.Boards are very stable when first running.After waiting for a while, when I want to send message it sends message a few moments later .
    Could it be because of my boards?

    2.When I send data very often the boards are freezes?


    PrashanthS,I am very grateful for your help.

    Regards,
    EMRE
  • Hello EMRE,
    I have not used HTERM before, so I cannot really comment. Having local echo is important, it will be difficult to verify the command execution with out it. Note that backspace does not work when typing commands.

    1. This was developed and tested on CC1310 launchpad, I did not see a lag issue when trying it after leaving it overnight. It seems to work fine.

    2. The RF data rate is 500 kbps. When sending messages frequently there may be timing issues with UART data getting rendered frequently on the terminal. Lowering the RF data rate will help in this case. You can use smartRF studio to play with different data rates and import the settings from the smartRFstudio to the CCS project. You can refer here on how to do this dev.ti.com/.../prop_01_basic.html

    Hope this helps.
    Regards,
    Prashanth
  • Hi PrashanthS,
    I have checked SmartRF studio,
    1)We made a custom board it has cc1310 and cc1190 when i use hgm ,my custom boards signal level is -30dB.
    cc1310 launchpad signal level is -14dB(max) athough there isnt cc1190.How can we increse signal level ?

    2)My second question is about uartread .In uartTxTaskFunction we are trying to read data in while loop.If I do it with uartreadcallback, does the system get faster? I try some codes but it is not working completely.

    here is the code changes

    I have change tasks priority
    #define RX_TASK_STACK_SIZE 1024
    #define RX_TASK_PRIORITY 1

    #define TX_TASK_STACK_SIZE 1024
    #define TX_TASK_PRIORITY 4

    #define UART_RX_TASK_STACK_SIZE 1024
    #define UART_RX_TASK_PRIORITY 2

    #define UART_TX_TASK_STACK_SIZE 1024
    #define UART_TX_TASK_PRIORITY 3


    and uartTxTaskFunction


    char input;
    uint8_t charIndex=0;
    static void readCallback(UART_Handle handle, void *rxBuf, size_t size)
    {


    //size_t i ;
    // Copy bytes from RX buffer to TX buffer
    //for(i = 0; i < size; i++)
    //txBuf[i] = ((uint8_t*)rxBuf)[i];
    //input = ((uint8_t*)rxBuf)[0];
    // Echo the bytes received back to transmitter
    //UART_write(uart, txBuf, 1);
    // Start another read, with size the same as it was during first call to
    // UART_read()
    /* Skip the line feed that appears after an enter as the first character of new line */
    if (input == (char)CHAR_LINEFEED)
    charIndex--;


    if ((input == (char)CHAR_LINE_END_1) | (input == (char)CHAR_LINE_END_2)) // (charIndex < UART_SERIAL_LINE_SIZE))
    {
    /* Cancel Rx */
    RF_cancelCmd(rfHandle, rfRxCmd, 0);
    Semaphore_post(semTxHandle);
    /* reset index to zero to point to begining of the line */
    charIndex = 0;
    }
    else
    {
    /* Store the input character */
    //uartTxBuffer[charIndex++] = input;
    txPacket[charIndex++] = input;
    }

    UART_read(uart, &input, 1);
    }

    static void uartTxTaskFunction(UArg arg0, UArg arg1)
    {
    /* Open UART if not already open */
    if (uart == NULL) {
    /* Create a UART with data processing off. */
    UART_Params_init(&uartParams);
    uartParams.writeDataMode = UART_DATA_BINARY;
    uartParams.readMode = UART_MODE_CALLBACK;
    uartParams.readDataMode = UART_DATA_BINARY;
    uartParams.readCallback = readCallback;
    uartParams.readReturnMode = UART_RETURN_FULL;
    uartParams.readEcho = UART_ECHO_OFF;
    uartParams.baudRate = 115200;
    uart = UART_open(Board_UART0, &uartParams);

    if (uart == NULL) {
    System_abort("Error opening the UART");
    }
    }

    UART_read(uart, &input, 1);

    while (1)
    {
    //UART_read(uart, &input, 1);
    }
    }
  • Q: We made a custom board it has cc1310 and cc1190 when i use hgm ,my custom boards signal level is -30dB.
    cc1310 launchpad signal level is -14dB(max) athough there isnt cc1190.How can we increse signal level ?

    A: Please verify that PA_EN and LNA_EN are set correctly.

    I assume the power levels you have measured are conducted?
  • Hello TER,
    I set and verified signals like that

    (1=3.3V)
    HGM = 1;
    LNA = 1;
    PA =0 ;

    Are these values correct ?

    Here is the code part :

    PIN_Config pinTable[] =
    {
    Board_HGM | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    Board_LNA_EN | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    Board_PA_EN | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,

    PIN_TERMINATE
    };

    and I set them in rxTaskFunction like that

    PIN_setOutputValue(pinHandle, Board_HGM,1);//high gain
    PIN_setOutputValue(pinHandle, Board_PA_EN, 0);
    PIN_setOutputValue(pinHandle, Board_LNA_EN, 1);//rx mode
  • The signals looks correct for RX. You didn't state under which conditions you measured this. Is it conducted or radiated? If the later, which antenna and at which distance?