External Mode

Communication interface

Select the transport layer external mode uses to exchange data between the host and the target hardware.

Settings

Default: Serial

Serial port

Enter the serial port that the target hardware uses.

To find the serial port:

  1. Go to Start menu > Control Panel > Device Manager > Ports (COM & LPT).

  2. To expand the ports, that Windows recognizes, click the plus (+) sign. The port that you want is STMicroelectronics STLink Virtual COM Port (COMx). x is the number of the port.

    For example, if the serial port is labeled as STMicroelectronics STLink Virtual COM Port (COM1), in the Serial port parameter, specify the serial port as COM1.

Settings for STM32F4-Discovery

Default: COM1

Settings for STM32F746G-Discovery

Default: COM20

Settings for STM32F769I-Discovery

Default: COM1

Logging buffer size (in bytes)

Specify the number of bytes to preallocate for the buffer in the hardware during Universal Measurement and Calibration Protocol (XCP)-based External mode simulation. Specify the Logging buffer size (in bytes) to a value large enough to accommodate the logged signals.

When specifying the buffer size, ensure that the maximum value of this parameter does not exceed the available STMicroelectronics® STM-Discovery memory, which Simulink® Real-Time™ also uses to store other items. For example, in addition to signal logging data, the software also uses the STMicroelectronics STM-Discovery memory for Simulink Real-Time kernel, real-time application, and scopes.

Assume that your model has six data items (time, two states, two outputs, and task execution time). If you enter a buffer size of 100000, the target object property tg.MaxLogSamples is calculated as floor(100000 / 6) = 16666. After the buffer saves 16666 sample points, it wraps and further samples overwrite the older ones.

Settings

Default: 5000

Verbose

Select this check box to view the external mode execution progress and updates in the Diagnostic Viewer or in the MATLAB® Command Window.

Settings for STM32F4-Discovery

Default: off

Settings for STM32F746G-Discovery

Default: on

Settings for STM32F769I-Discovery

Default: on

See Also

| |