Skip to Content
Block descriptionsGPIOGPIO Toggle Pin

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.



GPIO Toggle Pin block

Table of Contents

Inputs

This block has no inputs.

Outputs

This block has no outputs.

Block Parameters

ParameterDescription
PortGPIO port identifier letter, e.g., 'A', 'B', 'C', etc.
Pin numberGPIO pin index numbers, e.g., a value of [0 1] defines two pins whose logical states will be toggled.
Sample timeThe refresh execution period of the function.


Parameters for GPIO Toggle block

CubeMX Configuration for a Given MCU Model

No.NamePathSettingDescriptionScreenshot
1GPIO PIN as GPIO_OutputPinout & Configuration > Pinout view > Right-click the selected pin > GPIO_OutputGPIO_OutputSelects the operational GPIO pin to be utilized as an output. The pin must be explicitly configured as GPIO_Output.GPIO Configuration in CubeMX

See Also

Last updated on