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/LAUNCHXL-CC2650: UART vs BLE Stack in project0

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: SYSBIOS, CC2640, CC2650

Tool/software: TI-RTOS

Hi!

I started with project0. In my project, there is two task, one for the BLE Stack and one for UART. I use the BLE with higher priority. How can I balance this two task, It's enough to use Task_sleep(), or I have to use semaphore maybe hardware interrupt?I'm not sure ,how ProjectZero_taskFxn use semaphore. I've already find out that the semaphore post is in user_enqueueCharDataMsg, but where is the semaphore pend?  

And another question. Can I find somwhere any summarize to project0, which describes the program strucure. I've found out a lot of things, but there is a bunch of things in which I'm not sure.

Best regards,

Mayer Tamás

  • Hi,

    You can take a look at simplelink academy training : custom profile which will walk you through how to enable your custom msg and queuing the msg.

    The SW structure is covered in our software developer's guide :
    software-dl.ti.com/.../index.html
  • Hi Christin!

    I've did it already. My only problem is the UART. In the project there is an UART.h file. I tried to use Uart with this but it's not working. I also tried with NPI but the UART.h seems to me more simple.Can I use this for UART. If I can't ,where can I find a proper description on NPI/UART. I already tried with this software-dl.ti.com/.../index.html but it's not clear yet, how can I recieve messages from UART. My pourpose is , that I want to recieve strings from UART, and I want to send it with the data service.

    static void UARTfx_init(void)
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    {
        UART_Params uartParams;
        const char echoPrompt[] = "\fEchoing characters:\r\n";
        /* Create a UART with data processing off. */
        UART_Params_init(&uartParams);
        uartParams.readMode = UART_MODE_CALLBACK;
        uartParams.writeMode = UART_MODE_CALLBACK;
        uartParams.readTimeout = UART_WAIT_FOREVER;
        uartParams.writeTimeout = UART_WAIT_FOREVER;
        uartParams.readCallback = IThandler;
        uartParams.writeCallback = IThandler;
        uartParams.baudRate = 9600;
        uart = UART_open(Board_UART0, &uartParams);
        if (uart == NULL) {
            System_abort("Error opening the UART");
        }
        UART_write(uart, echoPrompt, sizeof(echoPrompt));
    }
    static void IThandler()
    {
        //Semaphore_pend(sem,ti_sysbios_knl_Semaphore_PendState_WAIT_FOREVER);
        UARTFxn();
    }
    static void UARTFxn()
    {
        
        UART_read(uart, &UART_input, 1);
        DataService_SetParameter(DS_STRING_ID, sizeof(UART_input), UART_input);
       }
    This is my code.
    Anyway I followed the steps from "Developing a Bluetooth Low Energy Application" but mainly it is for cc2640, and the library structures are different.(for example IcallBLE)
    My major question is , which is the best way to make a proper UART in project zero , which I want to use to send these data with Data service.

    Best regards,

    Mayer Tamás

  • If what you want is sending data to CC2650 through UART and then send the data over the air, then you can start with our serial port profile example.

    The documentation of the example can be found here:
    github.com/.../spp_ble.md

    The example can be downloaded here :
    github.com/.../cc2650lp
  • Hi!

    I've started with spp_ble and I could compile but the server is not connecting to the client. I used the proper baudrate(921600) and I've also tried with 115200 (set SDI_UART_BR macro), but it's not working.I have ble_sdk_2_02_01_18 but this project didn't worked for me out of the box. I only could compile after I collected and copied the content of the Startup and the Application folder, and  copied the SDI folder to the project directory. Maybe it is the source of the problem.I've got errors that the path is invalid, but I've looked after all of the missing files and they where on the proper place.

    When I tried debug the client_app with brakepoints, I've got this :

    AutoRun: Target not run as breakpoint could not be set: Error enabling this function: There is no AET resource to support this job.

    I've got this on Putty.

    And can I use Btool or BLE Device Monitor to this project?

    Best regards,

    Mayer Tamás

  • Hi

    As mayer tamas I Download the Uart SPP demo and got the same results in the console the Client is working and trying to performs atuto connecting while there is no response from the server side and there is no option to perform BP to debug the issue.

    Anyone solves that issue or have any workaround?

    BR

    Yehonatan Spiegel

  • Hello,

    I seem to be having the exact same problem too. I have been trying for several days now to get the spp_ble to work but I got the EXACT problem as Mayer Tamas described. I would really appreciate it if TI could resolve this issue. This is an example from TI and it should be a simple plug and play... and unfortunately it is not.
    Looking forward to TI's resolution since this is really holding back our project...

    Eyal

  • What's your compiler version? For BLE 2.2.1, your CCS compiler has to be TI ARM Compiler 5.2.x(prefer 5.2.6)
  • I am using CCS  7.0.0.00043 

    With Compiler TI v16.9.0 LTS 

  • Please use the compiler version suggested in the BLE SDK. (TI ARM Compiler 5.2.x(prefer 5.2.6))
  • Can you attached link to that compiler version ?
  • Please take a look at our software developer's guide section 2.6.3.1. It covers how to get a different version of compiler in ccs.
  • Thanks Christin.

    We downloaded the TI ARM Compiler 5.2.x(prefer 5.2.6) like you suggested and it solved our problem.
    It works. Thanks a lot.

    Regards,
    Eyal