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.

TI-RTOS UART Issue

I’m working on a project using the TM4C129X dev kit as a starting point, and IAR 7.20.1.7307 as the dev tool. We are attempting to use the UART0 through the Stellaris virtual COM port. We have had good success with the stand-alone uart_echo demo, but the demo from the TI-RTOS (tirtos_tivac_2_00_01_23) is not working for us using the RTOS UART drivers. Specifically, the call to the “UART_Read” function never returns no matter how many bytes are sent to the board. The issue is not the virtual COM port, as I can see the data coming in on the UART0 Rx line. The “UART_Write” function does work. This occurs using the “uartecho” demo project with no modifications. Thanks!

  • Hi Steve,

    First, do you feel the application is being loaded properly? We've seen some issues with IAR 7.20 loading TM4C devices.

    Please note there are two UART Echo examples. There is uart_echo in TivaWare. This is a bare-metal (e.g. no RTOS) example that is built on driverlib.

    There is a UART Echo in TI-RTOS. This uses the UART driver in TI-RTOS (which is built on TivaWare's driverlib also, but has RTOS awareness added in). Please look at the Getting Started Guide in TI-RTOS for instructions on how to import a TI-RTOS example.

    You cannot just add the TI-RTOS UART calls into a bare-metal example (I'm surprised, if this is what you are doing, you did not get unresolved symbols). Can you try the TI-RTOS UART Echo example and see if that works for you?

    Todd

  • The application appears to be loading correctly, I can step through the program right up to the "UART_Read" call, which never returns. We have successfully run the TivaWare (no RTOS) example, so there's no hardware issues. To be clear, it is the TI-RTOS UART echo example which I have imported following the instructions in the Getting Started Guide for TI-RTOS, and which does not work. I would like to use the RTOS-aware UART driver if possible.

    I do see occasional problems with IAR loading, but it is obvious when this happens and this is not what is occurring here. Note that the UART_Write function does work, it is the UART_Read function that does not return.

  • One last thing to make sure we are on the same page...the UART Echo example you are trying has no other changes...correct? 

    I've attached my TI-RTOS UART Echo binary (I had to change the .out to .h!). Can you try it?

    6758.app.h

    My TI-RTOS is a slightly newer engineering build, but nothing changed in this area.

    Can you post your's to see if I can run it?

    Todd

  • I was able to successfully run the RTOS uartecho in CCSv6. I then built a release version in IAR 7.2 and tested that - it also worked. Then ran a "rebuild all" in IAR (rather than just "make") in the debug configuration, and was able to debug the program from that point. There are some issues with the IAR debugger going off into the weeds, but that would be an IAR thing and probably not a subject for this forum.

    So thanks for the help, and we can close out this issue.

  • I would suspect the call ends up in a blocking read at the lowest level. I've found that even UART_readPolling ends calling up blocking on a register read in UARTCharGet() (even though there is a perfectly good polling version of this function). I gave up dealing with the problems and found another RTOS & tool-chain.