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.

LAUNCHXL-CC2650: BLE projext_zero/UART implementation

Part Number: LAUNCHXL-CC2650

Hi !

My 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.I also read all the simlpllink acaedmy tutorials, but I couldn't find a specific UART task example, with multiple tasks.

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
static void UARTfx_init(void)
{
    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)
I've started copying the .c and. h files from the proper Icall folders to the actual Icall folders, but now it's worse than before. It's so frustrating, I've only wanted a simple UART interface to my program.
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