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.

Linux/TM4C123GH6PM: UART 0 need hardware reset before receiving data from linux

Part Number: TM4C123GH6PM

Tool/software: Linux

Hello all, 

I have an issue with the UART0 of the Tiva board (launchpad), working through USB debug port. my application is supposed to receive datas coming from a Linux PC, connected to the Tiva with the USB cable. 

The connection is normally established, however the tiva doesn't receive anything until we make an hardware reset directly on the board with the button. 

Do you have any solution to this trouble ? 

thanks in advance for your help !

  • Hi,
    If you try the TivaWare uart_echo example, do you see the same problem? Can you also try your application running from a Windows PC?
  • Hi,
    The uart_echo works well without reset. I have tested my app by sending uart from a windows and it doesn't work witout reset neither ...

    Thank you for your help !

    Elisabeth
  • Hi Elisabeth,
    Not sure what is wrong. Are you setting up the UART in interrupt or polling mode in your application? Can you find out what the CPU is doing when your PC is sending data to the MCU? Is it possible that the UART is not yet initialized when the PC sends the data. After you initialize the UART can you toggle a GPIO pin so you know where the CPU is at, and its relationship to when the PC sends the data.

  • Hi Charles,

    Would it not 'prove useful' to move the MCU's 'UART0 initialization code' to (near) last to be executed - and to (even) execute a, 'UART0 - Peripheral Reset' - prior to the complete UART0 initialization?

    Poster must be sure to insure that UART0 is 'Ready' - via the API Command - as well.

    It is assumed that, "noise via Plugging-In the USB Cable" (or similar) has forced UART0 into an 'unhappy state.'     The combination

    • 'later UART0 Initialization' (w/in the general MCU initialization sequence)
    • AND 'commanded',  'UART0 Peripheral Reset'  
    • (and then 'Wait till Ready')  - will allow UART0 to  properly initialize & thus - perform correctly...

    The 'dualitiy' of 'Debug and UART Usage' - via the 'ICDI' MCU - (sometimes requires (extra) safeguarding...)

  • Hi Elisabeth,
    Is this issue resolved?
  • Hi Charles,

    The UART is set in interrupt mode. As we manually send datas through UART, I suppose it it properly initialized because even if we wait a long time after powering up the tiva nothing happen.
    May the issue be the fact that the tiva is both powered on and uart connected through the same USB ?

    regards,

    Elisabeth
  • Hi Elisabeth,
    Did you have a chance to try what I suggested? Toggle a GPIO pin after the UART is initialized and perhaps toggle another GPIO pin when the UART enters the ISR.
  • Hi,
    Is this issue resolved? I did not hear back from you. I will close this thread for now. You can open the thread again or create a new thread if you have questions.