Main Content

Digital Port Write

Set GPIO pin status

  • Library:
  • Embedded Coder Support Package for STMicroelectronics Discovery Boards/STM32F4xx Based Boards

    Embedded Coder Support Package for STMicroelectronics Discovery Boards/STM32F7xx Based Boards

    Embedded Coder Support Package for STMicroelectronics Discovery Boards/STM32G4xx Based Boards

    Embedded Coder Support Package for STMicroelectronics Discovery Boards/STM32H7xx Based Boards

  • Digital Port Write block

Description

Write the logical status of a GPIO port pins for STM32 processors.

Ports

Input

expand all

The input port to set the GPIO pin status in incremental order.

  • 0 - the respective pin is set to low value.

  • Non zero - the pin is active low or active high.

Dependencies

To read multiple port values, select Access port pins as array parameter.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated | bus

Output

expand all

he simulation-only message output port, when connected to an Digital IO Interface (SoC Blockset) block, acts as pass-through with the output emitted on the output of the Digital IO Interface block during simulation. When the Access port pins as array parameter is not selected, a simulation port is generated for each pin in the Pin number parameter, otherwise the pin array must be treated as a scalar.

Dependencies

To enable this port, select the Enable simulation port parameter.

Data Types: SoCData

Parameters

expand all

Select one of GPIOA to GPIOK ports to set a GPIO pin status of a specified GPIO port.

Specify the GPIO digital pin to set the logical status.

Select this parameter to read multiple port pin values.

Select this parameter to add an SoC Blockset compatible simulation output port.

Version History

Introduced in R2021b