Main Content

Troubleshooting External Mode Issues

Troubleshooting XDS Virtual COM Port Issues

Problem

At times, conflicts with other FTDI devices can lead to XDS appearing with an error in the Device Manager.

Possible Solution

Re-install the correct FTDI drivers.

  1. Right-click on the XDS100 Channel A or XDS100 Class Debug Port node (for newer versions) in the Device Manager.

  2. Select Update Driver Software and then choose Browse my computer for driver software.

  3. Next, select Let me pick from a list of device drivers on my computer. If the drivers are already installed, you should see the XDS100 Class Debug Port drivers listed. In that case, select this option. If the drivers are not installed, proceed to the next step.

  4. Click on the Browse button and navigate to the directory: C:\ti\ccsv7\ccs_base\emulation\windows\xds100_drivers.

  5. Repeat the above steps for XDS100 Channel B as well.

When TI Code Composer Studio is installed and a TI board is connected to the host via USB cable, the XDS debug probe should appear in Windows Device Manager as shown below.

Problem

In cases where Windows refuses to update the driver, it is necessary to perform a complete removal of the existing drivers.

Problem Solution

To reinstall the drivers for XDS100 Channel A and XDS100 Channel B after the removal, follow these steps:

  1. Right-click on XDS100 Channel A in the Device Manager.

  2. Select Uninstall and make sure to check the box that says Delete the driver software for this device. Click OK.

  3. Repeat the above step for XDS100 Channel B.

After fully removing the drivers, proceed with the re-installation process.

Problem

Updating COM Port Configuration.

Problem Solution

The TI XDS reference design utilizes port A of the FTDI for JTAG, leaving port B available for UART functionality. The COM port associated with XDS Port B is used for external mode operation. To load the Virtual COM port corresponding to XDS Port B (UART), see to the Additional Information section in the XDS100 (ti.com) documentation.

You can update the COM port value for TI XDS100 Channel B (or XDS100 Class Auxiliary Port on newer versions) by navigating to Model Configuration Parameters > Hardware Implementation > Target Hardware Resources > External mode > Serial port in MATLAB preferences.

Starting from R2020b, Simulink automatically detects the COM port and allows you to select it from a drop-down menu. By clicking Refresh, you can view the latest serial port value stored in MATLAB Preferences for the hardware board and the updated list of available serial ports from the Device Manager. The selected COM port value is saved as a MATLAB® preference for a specific target, ensuring automatic selection when using the same target for a new model.

Troubleshooting GPIO Pin Assignment for SCI-A Issues

Problem

Incorrect GPIO pins configured for SCI-A serial port.

Problem Solution

When utilizing external mode, ensure that the GPIO pins are properly configured to match the pins available on your specific board, especially when utilizing the default SCI-A serial port.

For example, GPIO42 and GPIO43 pins are available on the F28379D LaunchPad and it is through these pins that the SCI-A module of the controller is connected to the USB emulator (FTDI chip).

Troubleshooting Switch or Jumper Settings

Problem

The issue relates to the board's jumper/switch settings, which control the routing of GPIO pins for SCI-A, causing problems with external mode functionality. It is essential to configure these settings correctly, especially if external mode issues persist, including specific error messages.

Problem Solution

To address this problem, follow these steps:

  1. For the F28069M launchpad and similar boards, refer to the provided tables and make sure that the jumper settings for JP6 (MUX_SEL) and JP7 (CH_SEL) are reversed to enable the GPIOs 28 & 29 for serial over USB emulation and external mode operation.

  2. Refer to your board's schematic for more detailed information on these settings.

  3. If external mode issues persist, particularly when encountering specified error messages, investigate the jumper/switch settings to ensure they are correctly configured.

  4. In case the problem remains unresolved, check the basic serial communication between the host and the target module on the specified serial module to ensure it is functioning properly before proceeding with external mode usage.

Troubleshooting Serial Baud Rate Settings

Problem

The issue relates serial baud rate settings.

Problem Solution

Addressing issues like data drop and optimizing external mode performance often involves adjusting serial baud rate settings. To modify these settings, navigate to Hardware Implementation > Target Hardware Resources > SCI_A and specify the desired baud rate in bits per second.

Note

Starting from R2020b, users have the flexibility to select from any available serial modules, enhancing customization.

For LaunchPads or ControlCards equipped with FTDI 2232H, baud rates up to 6 Mbps, or precisely 9 or 12 Mbps, can be selected. On ControlCards using FTDI 2232D, baud rates up to 1.5 Mbps, or exactly 2 or 3 Mbps, are supported. Carefully adjusting these parameters, depending on your hardware configuration, can significantly improve the reliability and speed of the serial-over-USB connection for Launchpads or ControlCards.

Troubleshooting Memory Overflow

Problem

The issue arises when attempting to capture large real-time buffers with an extended Duration, utilizing the heap section for memory allocation. Setting a high Duration value may trigger a warning indicating insufficient memory on the target to process the packet. This warning, if unaddressed, can lead to a failure in uploading data from the target to the host computer.

Problem Solution

To overcome the memory warning, consider specifying a larger heap size, provided that your target has ample memory. Navigate to Model Configuration Parameters > Code Generation > Build Configuration > Specify > Linker and modify the value of heap_size. If additional heap is required beyond what's available, refer Resolve memory issue for information on editing the Linker command file to increase system RAM memory.

For targets with limited RAM, such as F28027, it's essential to boot the code from flash due to the constraints on available memory. By addressing these considerations, users can optimize real-time buffer captures without encountering memory-related warnings or upload failures. For more, see Parameter Tuning and Signal Logging with Serial Communication.

Improving Performance Issues

  • Increase Serial Baud Rate: If scope traces exhibit breaks, consider boosting the serial baud rate. This adjustment can enhance the logging performance by facilitating faster data transfer.

  • Decrease Number of Signals: Reduce the number of signals selected for logging. This can optimize performance by minimizing the data volume being processed and transmitted.

  • Decrease Model Base Rate: Lowering the model base rate can contribute to improved logging performance. Adjusting the base rate can align the computational load with the capabilities of the hardware.

  • External Mode Caution: When utilizing external mode, be cautious not to exceed an acquisition frequency of 10kHz. Going beyond this limit may result in performance issues. Refer to the provided MATLAB Answer post for insights into modeling workarounds using Rate Transition blocks and DSP buffer blocks. These techniques can aid in stepping up the acquisition frequency to 50kHz on an F28379D board, applicable to various hardware configurations.

  • Alternative Data Logging Approach: Explore the 2 model approach as an alternative to external mode simulation for rapid data logging, supporting frequencies up to 200kHz. Refer to Acquisition frequency for detailed information on implementing this approach.

By implementing these tips, users can address breaks in scope traces and enhance the overall logging performance, ensuring smooth data acquisition and analysis in their Simulink models.

Additional Tips

  • Ensure MATLAB is started in admin mode and no other applications such as Code Composer Studio (CCS) are connected to the board.

  • Ensure the model is configured to run in external mode and the simulation time is set to a large value (such as Inf, which means infinity or 50 seconds) as highlighted in the figure below. If the value is not Inf, the external mode simulation runs till the specified simulation time and then stops. It may not work for lower simulation times like 10-15 seconds. Click on Run to execute the model in external mode.

  • Parameter tuning and signal logging for 8-bit data types is not supported over serial external mode for Texas Instruments C2000 processors.

  • An error stating Attempting to establish connection with hostname 127.0.0.1 through port ... indicates that either the COM port or the TCP/IP port 17725 on the local loopback are held by some other application. Ensure that the ports are available before launching external mode. External mode uses a process in the background to buffer data and improve data logging. This process needs port 17725.

  • When using a serial connection like DB9 connector on Spectrum eZDSP boards, use the COM1 port of Host PC for external mode connection.

  • If you cannot run your model in CCP external mode, please compare the model configuration settings from our example model with your model. For example: As CAN external mode is dependent on custom storage class canlib.signal, we should not select Ignore custom storage class in the Interface pane under Code Generation. For details on custom storage class canlib.signal refer to Signal Monitoring and Parameter Tuning.

  • Signals that are coming out of function call (triggered) subsystems or signals inside function call subsystems are currently not supported for logging due to asynchronous behavior. One workaround for this issue is to log outside the triggered subsystem after adding a rate transition block before logging.

  • For external mode over CAN, note that our examples are tested to work with hardware from Vector only. For more information, see eCAN Vector hardware.