Simulink unable to connect to target with multiple C2000 processors connected via a USB hub

12 visualizaciones (últimos 30 días)
Hello,
I have encountered an XCP internal timeout error when trying to program a C2000 microcontroller (specifically the LAUNCHXL-F28379D board), and this error only occurs when I have multiple microcontrollers plugged into the same host PC through a USB hub. When I have only 1 connected through the USB hub I am able to program (via monitor and tune in simulink), but when multiple are connected only 1 of them is able to be programmed, whilst the others throw the following error. Both of the connected microcontrollers are being read as their correct seperate COM ports, but only one of them allows for programming. This persists even when I power the processors through the USB hub (as opposed to having the USB isolated from the processor via removing JP1, JP2, and JP3). It also still happens when I disable the other COM ports. In the current design, I cannot simply physically unplug the other processors when trying to program a single one (as they will all be connected to the USB hub inside an enclosure). Thank you for any help.

Respuesta aceptada

Antonin
Antonin el 21 de Jul. de 2025
Hi Peter,
Very interesting question.
It is possible to run multiple instances of Monitor and Tune at the same time, here are considerations:
  1. While running monitor and tune, the code gets flashed via the debug probe (not the serial connection). The serial connection (COM port) is only used for communication while the code is running.
  2. You need to ensure that your Simulink model knows which board to flash. By default it picks the first one found in the sytem and flashes it irrespective of the COM port. That's the deafult behavior of Code Composer Studio if you don't specify a board serial number in your .ccxml file. If you have multiple boards connected to your computer it always picks the same one and ignore the others.
Two options:
  1. Flash each board by connecting them one by one and run Monitor and Tune on each of them separately with different COM ports. Once this is done, connect all of them to the host PC, but instead or clicking on the Monitor and Tune play button, click on the little arrow below and click on the "connect" button that you can find in the "step by step commands" section of the tool bar. The "connect" option assumes that the code is already flashed and that Simulink can just connect to an instance of Monitor and Tune running on your board. Since it skips the flashing part, and if the COM port is set correctly, you can connect to multiple boards at the same time.
  2. You can also specify in your Simulink model a board serial number to connect to. This is a little more advanced but it allows you to specify which board a particular model can connect to and make the difference between muliple boards connected to your system for the flashing part. The board serial number has to be saved in a .ccxml file. The following page explains how to generate a ccxml file pointing to a particular board serial number: https://software-dl.ti.com/ccs/esd/documents/sdto_ccs_multi-probe-debug.html#xds100. In summary, you have to use xds100serial.exe tool that you can find in your CCS installation folder (ccs\ccs_base\common\uscif) to find the board serial number. Then, you can edit and save a ccxml file pointing to that serial number. This can be done via the target configuration UI in CCS or by manually editing the ccxml file (cf below). You can then point to the newly created ccxml file in the configuration parameters of your Simulink model under Hardware implementation > Hardware board settings > Target hardware resources > build options > CCS hardware configuration file. Once this is done, your model will always flash the same board even if there are multiple boards connected to the host PC. This allows you to run multiple instances of Monitor and Tune at the same time while keeping all the boards plugged to your computer at all time.
Few other considerations:
  1. By default, we run Monitor and Tune with a baudrate of 5Mbps. If you connect multiple boards via a USB hub, the USB hub may become a bottle neck for the serial connections. If you face drops or sluggish behaviors, I would consider reducing the baudrate or make sure that you don't log signals at very high rates to allow all connections to go smoothly on the same USB channel.
  2. I don't think the power mode (via USB or USB isolated) makes a difference as long as there is enough current to power the boards.
  3. Here are the lines of code that are added to my ccxml file to specifcy a board serial number on line 11 of the ccxml file, below <instance XML_version="1.2" href="drivers/tixds100v2cs_child.xml" id="drivers" xml="tixds100v2cs_child.xml" xmlpath="drivers"/>. My board serial number is TI2RLGBT
<property Type="choicelist" Value="1" id="Emulator Selection">
<choice Name="Select by serial number" value="0">
<property Type="stringfield" Value="TI2RLGBT" id="-- Enter the serial number"/>
</choice>
</property>
I hope it helps, let me know otherwise.
Good luck,
Antonin.
  1 comentario
Peter
Peter el 22 de Jul. de 2025
Hi Antonin,
The first option won't work well with our design as the boards are within an enclosure and hence cannot be accessed to program individually. However I tried the second option and it worked perfectly well (and also is quite simple to implement). Thank you very much for the quick response and clear instructions.
Kind regards,
Peter

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by