GPIO Toggle Pin Block Description
This block enables toggling the state of a GPIO pin in STM microcontrollers. The pin state inverts from high to low or from low to high with each invocation of the block function.

Table of Contents
Inputs
This block has no inputs.
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] defines two pins whose logical states will be toggled. |
| 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
