Hi Peter,
Very interesting question.
It is possible to run multiple instances of Monitor and Tune at the same time, here are considerations:
- 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.
- 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:
- 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.
- 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:
- 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.
- 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.
- 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.