Main Content

Serial Configuration for External Mode and PIL

To prepare your model for external mode or PIL with serial communication:

  1. In the Configuration Parameters dialog box, select Model Configuration Parameters > Hardware Implementation.

  2. Select a C2000 processor from the Hardware Implementation > Hardware board drop-down list.

  3. Under Target Hardware Resources, select External mode/PIL.

  4. In Communication interface drop-down list, select serial for Classic External mode or XCP on Serial for External mode over XCP.

    Note

    For PIL, the communication interface is only with serial.

  5. Select SCI module under Target Hardware Resource.

  6. For the selected SCI module, configure the additional parameters Desired baud rate in bits/sec, Pin assignment(Tx) and Pin assignment(Rx).

    Note

    • By default SCI_A module is selected for Controlcards and Launchpads. For custom boards, if you are using different serial module to connect FTDI then select the appropriate serial module.

    • The default baud for Controlcards is 115200 bits/sec. For better performance, you may increase the baud to a value that your hardware board permits.

  7. Select the corresponding COM port that the target hardware uses from the drop-down. The COM port value will be saved as Serial port in MATLAB preference for a given target and not on a model. Click Refresh to see the latest value in MATLAB preference and updated list from device manager.

    To see the list of available COM ports on your computer, select Start > Control Panel > Device Manager > Ports (COM & LPT)

  8. Make sure that the Verbose check box is selected to view the external mode execution progress and updates in the Diagnostic Viewer or in the Command Window.

Your model is now ready to perform Monitor and Tune action (External Mode) over serial communication. For more information, refer Monitor and Tune over Serial Communication