GPIO Write Pin Block Description
This block enables writing the logical state of a GPIO pin in STM microcontrollers.

Table of Contents
Inputs
| Input Name | Type | Description |
|---|---|---|
| Pin state | bool | Conditional input Input ports feeding the targeted states to the GPIO pins. The specific port these inputs belong to is defined by the Port parameter. The total number of inputs and their designated indices are specified by the Pin number parameter. |
Outputs
This block has no outputs.
Block Parameters
| Parameter | Description |
|---|---|
| Port | GPIO port identifier letter, e.g., 'A', 'B', 'C', etc. |
| Pin number | GPIO pin index numbers, e.g., a value of [0 1 3] defines three separate input ports corresponding to pins 0, 1, and 3. The values must be wrapped in square brackets and separated by spaces. |
| Sample time | The refresh execution period of the function. |

CubeMX Configuration for a Given MCU Model
H7
| No. | Name | Path | Setting | Description | Screenshot |
|---|---|---|---|---|---|
| 1 | GPIO PIN as GPIO_Output | Pinout & Configuration > Pinout view > Right-click the selected pin > GPIO_Output | GPIO_Output | Selects the operational GPIO pin to be utilized as an output. The pin must be explicitly configured as GPIO_Output. | ![]() |
See Also
Last updated on
