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.

RTOS/MSP430F5659: USB and UART both running USB restarts

Part Number: MSP430F5659

Tool/software: TI-RTOS

Hello,

I am working on MSP430F5659 based USB CDC protocol over TI RTOS.

Here i am getting some problem while handling both USB and UART.

I have 5 task, Comm Task, Data Manager Task, Watch Dog Task, Utility Task, Handle Task.

While Command is sent from PC Application - Comm Task will parse the command and send to Data Manager Task, DM Task will call the UART to handle the external board,

Now if i use the same task to(DM task to TX/Rx with UART device and then try to send back the response to USB through Comm Task , i am getting USB restart. (UART works fine)

If i use another task (Handler Task ) to Rx/Tx with UART after sending reply to PC (Data manager Task -> Comm Task -> PC )it works. (UART works fine)

Note - > I am using HART communication over UART with 19200 Baud and using TimreA2 in that data packet state machine handling.

I am able to achieve the result but i want to know whether Timer A2 has any effect/ USB and UART both combination has a problem? Or any other mistake i am doing while handling UART/USB?

Please any one can help in finding the correct answer why USB restarts, when UART is stopped.

Thanking in Advance

Nitesh

 

  • Hi Nitesh,

    Can you please share what TI-RTOS version you use? Are you using the TI-RTOS UART and USB drivers?

    I'm also trying to understand your setup here - please confirm if my understanding of all of this is correct:
    USB CDC is for communicating between the MSP and the PC.
    UART is for communicating between the MSP and an external board.
    You were following sequence of Comm task receives data from PC, Data Manager task decides what to do with the command received, and then that calls the UART (inside data manager task) for the communication with the external board. When you did this, when you call Comm task afterward, USB restarts (does USB disconnect? Or specifically what happens?)
    You changed it so that the UART is instead called from a separate task, not from within the data manager task, and now it works.

    Questions/ideas:
    Is the data manager task blocking, and how long does it take if you call UART from it as well? Could it be taking too long/watchdog be timing out? What are the priorities of the tasks involved and can they pre-empt eachother or anything? Do you have enough space reserved for your stack?

    Regards,
    Katie
  • Hi Katie,

    Thanks for the reply , I am using TI RTOS Ver 2_14_03_28.
    You are understanding is correct.

    Now for your question My watch Dog is not turning OFF.
    Watch dog has highest priority -8 , Comm task has and Data manager has - 4, Handler task - 2, Utility - 2
    USB disconnects and comes back, my system is crashing in debug mode.

    Thanks in advance
    Nitesh
  • Hi Nitesh,

    First, I want to make sure you don't have a blown stack. Can you look in Tools->ROV->BIOS->Scan for Errors?

    Todd
  • Yes, i checked it not stack issue, I found not source code error.

**Attention** This is a public forum