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.

what is the difference between #include <ti/drivers/UART.h> and #include <driverlib/uart.h> ??

Hi,


I want to enable uart in my project, where i enabled uart using   #include <ti/drivers/UART.h> as an example program was given.
But functions which i needed are given in   #include <driverlib/uart.h>.

how do i use the <driverlib/uart.h>. this library in program and from where do i get base address??

Thanx

  • Hello,

    The former is for the TI-RTOS driver, and the latter is for the CC26XXWARE DriverLib. Please refer to the documentation in the TI-RTOS installation. Links to the documentation is in the BLE SW Developer's Guide (SWRU393).

    Best wishes
  • hi,

    I was able to implement uart using UART.h but when i am using uart.h library. what value do i set for ui32UARTClk ??? in the below function.

    UARTConfigSetExpClk (ui32Base,
    uint32_t ui32UARTClk,
    9600,
    UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE
    )



    and is this the right way to configure uart? 1. UARTConfigSetExpClk and then UARTEnable
    thanx.
  • hi JXS,

    I actually want to use uart.h library as it contains functions of my interest, i went through your doc link. but couldn't find details on implementing uart.h library its related to UART.h

    static bool UARTCharsAvail ( uint32_t ui32Base ) ; this function is of my interest in uart library i could find similar function in UART.h library but unable to implement it.

    UART_control(); so can u please guide me on how to implement this function ( To know number of characters available in read buffer)


    Thanx
  • Zaed,

    When using TI RTOS you should use the TI RTOS API found in ti/drivers/UART.h. This one will use the driver from ti/driver/uart/UARTCC26XX.c which uses the low-level driverlib calls.
    If you want to directly interface the UART hardware yourself I suggest modifying the UARTCC26XX.c driver instead of trying to use driverlib directly.

    Regards,
    Svend