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.

Tiva-C UART byte by byte control for All 8 channels

Other Parts Discussed in Thread: TM4C123GH6PM

I am trying to build an application in TI-RTOS using CCSv5 on a TM4C123GH6PM MCU.  My application needs to use all 8 UARTs, support Interrupts so that I can detect each byte as it is received as well as frame/parity errors.  In the UART ISR I want to trigger a one-shot timer (preferably) or use the FIFO receive timeout interrupt to detect the end of a message block, then trigger a SWI to process.

To date, I am totally unable to get any code put together that can serve as a framework that I can build off of.  I am developing / testing initially on the launchpad but need to eventually move to my real custom target board.  All the examples have limited configuration setups based on the launchpad.  Can anyone help me get started!!

  • Hi Stephen,

         Have you tried to make the UART0 to UART7 to work withouth using TI-RTOS?

         You, can use the uart_echo as base. Take note that PD7/U2TX defaults as NMI. You need to configure it as UART, using an unlocking code.

         You, can alternatively post this at the TIVA ARM Forum. Some people there post about wanting to make UART0 to UART7 to work for their personal learning.

    -kel

  • I am presently working on a non TI-RTOS test program that uses UART2.  I built it from an RTOS template in hopes that I could use the TI-RTOS features after getting the UART stuff working.  Currently this code is hung up in the debugger looking for boot.asm.

    Can't find a source file at "/db/ztree/library/trees/xdctargets/xdctargets-g39x/src/ti/targets/arm/rtsarm/boot.asm"
    Locate the file or edit the source lookup path to include its location.

    Can I create a TI-RTOS example project and mix in direct ISR TIVAWARE API calls to manage the UARTS.  I need to have ALL 8 UARTS working at the same time.

  • Hi Stephen,

         I don't have extensive knowledge with TI-RTOS to help regarding that. However, without TI-RTOS it is possible to use all UART0 to UART7, as long as they are properly configured.

    -kel

  • Hi Stephen,

    There are two ways to solve your problem:

    1. You can use a TI-RTOS project and the TI-RTOS UART driver. In a TM4C123GH6PM example project you will have to add the other UART peripherals and necessary configuration code to the 'Board.c' (EK_TM4C123GXL.c). The TI- RTOS UART driver doesn't currently have any API for frame/parity error detection or handling. Also there's no receive timeout interrupt built into the driver but you can use the Kernel timer for your timer idea.

    2. You can use a TI-RTOS project with the TivaWare UART driver API though it is not thread-safe. You will have to create Hwi instances for your interrupts. I believe with this driver you will have more control of the UART to achieve what you're trying to achieve, especially with the frame/parity error detecting.

    Regarding sample code to help you, If you want to look into the TI-RTOS UART driver approach, you can look at the UART echo example that ships with TI-RTOS. For the TivaWare approach, TivaWare also has a UART echo example that you can look at.

    Finally regarding why your code hangs, I'll need more info like: what version of TI-RTOS are you using and how did you create your project? I'll recommend importing one of the example projects and starting from there.

    Let me know if you have any more questions

    Moses

  • Thank you very much for your reply.  I am very glad to know that I can achieve FE PE control using the TivaWare model.  W/R/T my previous issue, I uninstalled CCS, et. al. and reinstalled with the latest TI-RTOS 1_21_00_09.  I don't know if there was an IDE problem but I know for sure I had a corrupted workspace which I also replaced.  I then started from the suggested uartecho RTOS project and followed the instructions in this post:

    TI-RTOS_project_to_a_custom_development_board

    I have just completed the process of modifying the echo project and it now (unlike last time) successfully compiles !!  YEAH!!  I will now change it to use one of the other UARTs and see where I am.

    After I succeed with this, I will go back and implement the Tivaware model.  Again - Thank you so much for your inputs.