Skip to Content

GPIO Write Pin Block Description

This block enables writing the logical state of a GPIO pin in STM microcontrollers.



GPIO Write Pin block

Table of Contents

Inputs

Input NameTypeDescription
Pin stateboolConditional 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

ParameterDescription
PortGPIO port identifier letter, e.g., 'A', 'B', 'C', etc.
Pin numberGPIO 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 timeThe refresh execution period of the function.


Parameters for GPIO Write Pin 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