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.

TMS320F28P650DK: Connecting to GUI via UART

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: C2000WARE

Hi,

I'm designing a power supply and wanting to connect to an external GUI to monitor voltages, check faults, enable/disable converter, etc. I'm trying to connect to the GUI via UART.

How do I set up the code in order to connect and communicate with the GUI without interfereing too much with the control ISR?

Are there any examples doing this?

  • Hi Mike,

    Are you using one of the GUIs provided by TI (powered by GUI Composer)? If so, which one are you using? We have a GUI available for certain reference designs (called Motor Control Workbench) which already comes with a built-in communication protocol and UART(SCI) code you can use and compile through the GUI, I'm not sure if this is what you're referring to?

    If not, which GUI are you using? 

    Best Regards,

    Delaney

  • Hi Delaney,

    We're planning on using a custom GUI that we're developing. I haven't of heard GUI Composer or any GUIs that TI provides. I haven't seen any examples of how this is done so I'm in the dark here.

    I'm trying to figure out how to set up the code to send/ receive data to the UART buffers like monitor voltages, enable/disable, etc. I have a control ISR and trying to set up something to where the UART can communicate in the background

  • Hi Mike,

    For reference, the GUI provided by TI that I was referring to is MOTORCONTROL-WORKBENCH-GUI GUI for evaluation module (EVM) | TI.com if you want to look more into it. What platform are you using to create your GUI? 

    Thanks,

    Delaney

  • We're using Visual Studio. Are there some examples on sending/receiving data via UART?

    I'm getting this error when trying to download the GUI

  • Hi Mike,

    I'm still a little bit confused. Are you using a GUI powered by Visual Studio (if so, what is it called)? If you are looking to interface with UART/USB via a python script run in visual studio I can help with that? Please help me understand the details better. 

    I have checked and apparently there is something wrong with the download link for this currently. I have the exe file and I can send it to you through E2E DM. I have sent you a friend request.

    Best Regards,

    Delaney

  • Hi Delaney,

    So our team is building a GUI from scratch using C# code in Visual Studio.

    I'm trying to understand how to send/receive data on the c2000 side without affecting the control ISR. 

  • Hi Mike,

    I see, thank you for clarifying. For the C2000 side, I would suggest using the DMA with the UART module so that the control ISR can run unaffected. We have a UART+DMA example in the C2000ware SDK path: [C2000ware path]/driverlib/f28p65x/examples/c28x/uart/uart_ex4_loopback_dma. For a custom GUI, you can make your own protocol or transmission scheme based on the needs of your system. For example, maybe the UART is configured to trigger the DMA every time the TX FIFO has 12 bytes available, and it will loop through the status variable sending the data one at a time with a unique identifier. The GUI code will have to have common knowledge of this protocol/scheme so that it can interpret the received data properly. The RX side would be the opposite. Overall, I would suggest a fixed length of messages for simplicity, whether it be 12 bytes at a time or a different amount. 

    Hardware-wise, if you are using a F28P65x LaunchPAD, specific jumper settings allow you to route specific UART GPIOs to a UART-to-USB bridge. If configured properly, when the LaunchPAD is plugged into a PC, the USB will open a COM port on your PC where the data transmitted and received can be interfaced with. For your C# GUI code, you will need to find some example code that interfaces with a COM port. Note that the COM port number could change every time you connect but it should mention the "XDS110 Class Application/User UART".

    Please upvote this response if is the type information you are looking for and let me know if you have any questions.  

    Best Regards,

    Delaney

  • Hi Mike,

    Does the above answer your question? If so, please upvote it. If not, I can answer any other questions you may have.

    Best Regards,

    Delaney