HAL GPIO Overview

Introducing GPIO

group GPIO_Introduction

  • This introduction is under development.

Module and files

The following diagram illustrates the GPIO module and its associated files.

Module and files diagram

Component diagram

The following diagram illustrates the software components involved in the GPIO module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.

@startuml

<style>

componentDiagram {

   arrow {

      FontSize 8

   }

}

</style>



title GPIO Software Component Diagram



package "HAL" {

    [HAL_SERVICES]

    [HAL_GPIO]

}



package "Low Layer" {

    [LL_GPIO]

    [LL_LPGPIO]

    [CMSIS]

}



package "HW" {

    [STM32_HW]

}



[Appli] --> [HAL_GPIO] : HAL GPIO API

[Appli] <-- [HAL_GPIO] : GPIO pins states

[HAL_GPIO] --> [LL_GPIO] : LL GPIO API

[HAL_GPIO] --> [LL_LPGPIO] : LL LPGPIO API



[LL_GPIO] --> [CMSIS]:GPIO register definition

[LL_LPGPIO] --> [CMSIS]:LPGPIO register definition

[STM32_HW] <-u--> [CMSIS] : GPIO registers R/W

@enduml

Configuration table

The following table lists the configuration defines for the HAL GPIO module, specifying their locations, default values, and descriptions:

group GPIO_Configuration_Table

Configuration inside the GPIO driver

Config defines

Description

Default value

Note

USE_HAL_GPIO_MODULE

hal_conf.h

1

When set, HAL GPIO module is enabled

USE_HAL_CHECK_PARAM

hal_conf.h

0

When set, parameters are checked in runtime

USE_ASSERT_DBG_PARAM

PreProcessor env

NA

When defined, enable the params assert

USE_HAL_GPIO_CLK_ENABLE_MODEL

hal_conf.h

HAL_CLK_ENABLE_NO

Enable GPIO port clock in HAL_GPIO_Init

USE_HAL_GPIO_HSLV

hal_conf.h

0

Enable GPIO High Speed Low Voltage feature