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.

PROCESSOR-SDK-OMAPL138: UART Interrupt example in OMAPL138 TI-RTOS

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138,

I am looking for the PDK_OMAP examples for UART that uses Interrupt on ARM cpu and TI-RTOS.

the current package I have does not have such example, current examples uses polling methods for UART read and writes.

Also it would be helpful if I get some information or documentation on how to use available UART drivers and setup interrupt callback for read/write methods.

or do I have to write the UART drivers from scratch to use ISR and ultimately HWI/SWI setup?

Thanks!

  • Hello,

    Please refer to OMAP-L13x/C674x Resources and FAQ, and look for omapl138_c6748_ccs_projectspecs.zip. Once you download the CCS projects, look for omapl138_c6748_ccs_projectspecs\ccs_examples\windows\OMAPL138\UART_BasicExample_lcdkOMAPL138_armExampleProject.

    do I have to write the UART drivers from scratch to use ISR and ultimately HWI/SWI setup?

    No, you can use the UART LLD inside OMAP PDK. Please download the Processor SDK RTOS for OMAP-L138.

    Please note that TI has stopped supporting TI-RTOS based and bare-metal SW development for OMAP-L138. Please refer to the announcement and find consolidated resources there.

    Regards,

    Jianzhong

  • Hi Jianzhong,

    Thanks for the reply, I tried the Processor SDK example shared by you

    "\Desktop\omapl138_c6748_ccs_projectspecs\ccs_examples\windows\OMAPL138\UART_BasicExample_lcdkOMAPL138_c674xExampleProject".

    This looks same as the example available in my originally downloaded pdk packages.

    "C:\ti\pdk_omapl138_1_0_11\packages\MyExampleProjects\UART_BasicExample_lcdkOMAPL138_c674xExampleProject"

    These examples uses UART_ReadPollig (), I want to setup UART to use ISR. 

    is there any information on:

    - how I set this examples to use ISR based read and writes?

    - how I enable UART interrupts in TI-RTOS/SYS-BIOS calls?

    Thanks,

    Kuldeep

  • Part Number: OMAP-L138

    Hi,

    we are working on omapl-138, I am trying to modify UART example code from pdk package.

    The available project uses UART in polling mode I am trying to change it to interrupt based. 

    So far I have not found any documentation stating how exactly to do this,

    The TI has officially stopped supporting TI-RTOS (as mentioned in reply of other post of mine "e2e.ti.com/.../4007650

    I know it is wrong approach, but I have changed the drivers libraries on my own to achieve hwi from uart.

    1> in UART_stdio.c I chnaged UART_stdioInit method just before calling UART_open(), this sets the parameters to enable the interrupt.

    void UART_stdioInit(uint32_t value)
    {
    UART_Params params;
    SemaphoreP_Params semParams;
    char semName[] = "uartStdio";

    if(uart_stdio.uart_handle==NULL)
    {
    UART_init();

    UART_Params_init(&params);

    // Edited
    // ------------------------------------
    params.readMode = UART_MODE_CALLBACK;
    params.readCallback = test_isr;
    // ------------------------------------

    uart_stdio.uart_handle = UART_open(value, &params);

    /*
    * Construct thread safe semaphore for UART_printf
    */
    UART_osalSemParamsInit(&semParams);
    semParams.mode = SemaphoreP_Mode_BINARY;
    semParams.name = semName;
    uart_stdio.sem = UART_osalCreateBlockingLock(1U, &semParams);
    }
    }

    2> Also I for experiment purpose I changed UART_gets() method so the getc() is called only once to enable interrupt and not in a while loop.

    3> Currently I am getting interrupt everytime a character is received via UART (hwi callback is called for every character input), this is because default FIFO level is set to 1.

    I want to change FIFO level to max (14) but I could not find any direct function or API calls to do so.

    There is a function UART_fIFOConfig_v0() called from UART_open_v0() which ultimately updates the UART's FIFO registers.

    Also in future we would like to change UART baud via gui of the project, I understand I would not have to call hardware level functions and I can still configure UART as per my requirements during initialization time.

    - I am using pdk_omapl138_1_0_11

    my questions are:

    - Do I have to make these changes at driver level, in order to get UART interrupt working (and change FIFO level and BAUD Rates)? it feels wrong to do so, I have been changing driver functions which should not be the point of libraries.

    - There should be api calls to change these values when I  wan.

    - and there should be documentation on how to call those apis (for example things that can be done before UART_open() or after UART_open() )

    If some one has walked this path please help us. 

    Thanks!