Default Hardware Implementation Pane

Configure PX4® flight controller to run Simulink® models.
In the Simulink Editor, select Simulation > Model Configuration Parameters.
In the Configuration Parameter dialog box, click Hardware Implementation.
Set the Hardware board parameter to one of these, based on the board connected to the host computer:
PX4 Pixhawk® 1
PX4 Pixhawk® 2.1 (Cube)
PX4 Pixhawk® 4
Pixhawk® Series
PX4 Pixracer
Additionally, you can also select PX4 Host Target as
the Hardware board to perform only simulation using the
jMAVSim simulator.
The parameter values under Hardware board settings are automatically populated to their default values.
You can optionally adjust these parameters for your particular use case.
To apply the changes, click Apply.
For more information on selecting a hardware support package and general configuration settings, see Hardware Implementation Pane.
| Parameter | Description | Default Value |
|---|---|---|
| Build action | Option to specify whether you want only the build, or the build, load, and run actions during code generation |
|
| CMake configuration | Change the CMake configuration file that is used to build the firmware. |
|
| Automatically determine serial port for firmware upload | Enables the automatic detection of the serial port for firmware upload, based on the hardware connections Note This parameter does not appear if you select the Hardware board as PX4 Host Target. | on |
| Serial port for firmware upload | Select the serial port of the host computer for firmware upload Note This parameter does not appear if you select the Hardware board as PX4 Host Target. |
|
| Serial port for NuttX (NSH) Terminal | Select the serial port of the host computer for Nuttx (NSH) terminal Note This parameter does not appear if you select the Hardware board as PX4 Crazyflie 2.0. |
|
| Allow flashing FMUv3 CMake configuration on Pixhawk 1 | (Applicable only if you selected PX4 Pixhawk1 or PX4 Pixhawk Series as the Hardware Board) Determines if you need to allow flashing FMUv3 configuration on Pixhawk 1 |
|
| Simulator | Select the simulator to be used Note This parameter appears only if you select the Hardware board as PX4 Host Target. |
|
Note
This tab does not appear if you select PX4 Pixhawk Series as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| Enable Connected I/O | Enables the usage of Connected I/O | on |
| Hardware board Serial Port | Serial port number on the PX4 flight controller board for Connected I/O communication Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | /dev/tty/ACM0 |
| Use the same host serial port for Connected I/O as used for firmware upload | Sets the same host serial port for Connected I/O as the one used for firmware upload Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | on |
| Host Serial Port | Serial port number on the host computer for External mode communication Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | <empty> |
| Parameter | Description | Default Value |
|---|---|---|
| Communication interface | Communication interface that is used to exchange data between host computer and PX4 flight controller board. |
|
| Use the same host serial port for External mode as used for firmware upload | Sets the same host serial port for External mode as the one used for firmware upload Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | on |
| Host Serial Port | Serial port number on the host computer for External mode communication Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | <empty> |
| Hardware board Serial Port | Serial port number on the PX4 flight controller board for External mode communication Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | /dev/tty/ACM0 |
| Logging buffer size (in bytes) | Specify the memory buffer size for XCP-based External mode simulation. Note This parameter does not appear if you select PX4 Host Target as the Hardware board.
| 1024 |
| Verbose | View External mode execution progress and updates | on |
Note
This tab does not appear if you select the Hardware board as PX4 Host Target.
| Parameter | Description | Default Value |
|---|---|---|
| CPU Clock (MHz) | The CPU clock frequency in MHz | 168 |
Note
This tab does not appear if you select PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| Hardware board serial port | Serial port number on the hardware board for PIL communication Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | /dev/ttyACM0 |
| Use the same host serial port for PIL as used for firmware upload (mentioned under 'Build Options') | Enables the usage of same host serial port for PIL as the one used for firmware upload Note This parameter does not appear if you select PX4 Host Target as the Hardware board. | on |
| Host Serial Port | Serial port number on the host computer for PIL communication | COM6 |
Note
This tab does not appear if you select PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value in KHz |
|---|---|---|
| Bus 1 speed (KHz) | Defines the rate of data communication between the peripherals connected by the I2C Bus 1. | 100 |
| Bus 2 speed (KHz) | Defines the rate of data communication between the peripherals connected by the I2C Bus 2. | 100 |
| Bus 3 speed (KHz) | Defines the rate of data communication between the peripherals connected by the I2C Bus 3. | 100 |
| Bus 4 speed (KHz) | Defines the rate of data communication between the peripherals connected by the I2C Bus 4. | 100 |
Note
This tab does not appear if you select PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| Enable MAVLink on /dev/ttyACM0 | Enables the usage of MAVLink protocol Note If you enable MAVLink, you must also change the
| off |
Note
All the /dev/tty tabs are available for configuration
if you select any Pixhawk Series board as the Hardware board. However, if
you select PX4 Crazyflie 2.0 as the Hardware
board, only the /dev/ttyACM0 and
/dev/ttyS1 tabs are available for
configuration.
Note
None of the /dev/tty tabs are displayed if you select
PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| Baud rate | Defines the rate at which data is transferred over a serial line |
|
| Parity | Determines whether the UART or USART port generates and checks for even parity or odd parity |
|
| Stop bits | Sets the number of stop bits to indicate end of a packet |
|
| Enable hardware flow control | Enables hardware flow control using RTS and CTS pins | off |
| View port map | View the port mapping of UART or USART port on the PX4 flight controller |
Note
This tab does not appear if you select PX4 Crazyflie 2.0 or PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| Enable Oneshot125 protocol for Main PWM channels | Enables the Oneshot125 protocol for Main PWM channels |
|
| Configure Frequency for Main PWM channels (in Hz) | Set the frequency of Main PWM channels |
|
| Enable Oneshot125 protocol for AUX PWM channels | Enables the Oneshot125 protocol for AUX PWM channels |
|
| Configure Frequency for AUX PWM channels (in Hz) | Set the frequency of AUX PWM channels |
|
Note
This tab does not appear if you select PX4 Crazyflie 2.0 or PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| Main PWM channel x failsafe ON time value (in us) | Time value (in microseconds) that represents the ON time value of PWM signal for the particular Main channel, during failsafe condition |
|
| Main PWM channel x disarmed ON time value (in us) | Time value (in microseconds) that represents the ON time value of PWM signal for the particular Main channel, during disarmed condition |
|
Note
This tab does not appear if you select PX4 Crazyflie 2.0 or PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| AUX PWM channel x failsafe ON time value (in us) | Time value (in microseconds) that represents the ON time value of PWM signal for the particular AUX channel, during failsafe condition |
|
| AUX PWM channel x disarmed ON time value (in us) | Time value (in microseconds) that represents the ON time value of PWM signal for the particular AUX channel, during disarmed condition |
|
Note
This tab appears only if you select PX4 Host Target as the Hardware board.
| Parameter | Description | Default Value |
|---|---|---|
| PWM channel x disarmed ON time value (in us) | Time value (in microseconds) that represents the ON time value of PWM signal for the particular PWM channel, during disarmed condition |
|
| Parameter | Description | Default Value |
|---|---|---|
| Shutdown PX4 Autopilot upon overrun | Enables shutdown of PX4 Autopilot if task overrun occurs |
|