HAL SMBUS Overview

Introducing SMBUS

group SMBUS_Introduction

  • This introduction is under development.

Module and files

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

Module and files diagram

Component diagram

The following diagram illustrates the software components involved in the SMBUS 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 SMBUS Software Component Diagram



package "HAL" {

    [HAL_SERVICE]

    [HAL_SMBUS]

}



package "Low Layer" {

    [LL_I2C]

    [CMSIS]

    [SMBUS Interrupt routine service]

}



package "HW" {

    [STM32_HW]

}



[Appli] --> [HAL_SMBUS] : HAL SMBUS API

[Appli] <-- [HAL_SMBUS] : SMBUS callback

[HAL_SMBUS] --> [LL_I2C] : LL I2C API

[HAL_SMBUS] -l-> [HAL_SERVICE] : HAL_GetTick

[HAL_SMBUS] <-- [SMBUS Interrupt routine service]

[LL_I2C] --> [CMSIS]:SMBUS register def

[STM32_HW] -u--> [SMBUS Interrupt routine service]: SMBUSx Irq

[STM32_HW] <-u-- [LL_I2C] : I2C registers R/W

@enduml

Configuration table

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

group SMBUS_Configuration_Table

  1. Configuration inside the SMBUS driver

Config defines

Where

Default value

Note

USE_HAL_SMBUS_CLK_ENABLE_MODEL

hal_conf.h

HAL_CLK_ENABLE_NO

Enable peripheral clock in the HAL_SMBUS_Init

USE_HAL_SMBUS_MODULE

hal_conf.h

1U

When set, HAL SMBUS module is enabled

USE_HAL_SMBUS_USER_DATA

hal_conf.h

0U

Enable the set/get user data

USE_HAL_SMBUS_REGISTER_CALLBACKS

hal_conf.h

0U

Enable the register callbacks assert

USE_HAL_CHECK_PARAM

hal_conf.h

0U

Enable checking of vital parameters at runtime

USE_HAL_CHECK_PROCESS_STATE

hal_conf.h

0U

Check the HAL state transition in run time

USE_HAL_MUTEX

hal_conf.h

0U

Enable the acquire/release bus services

USE_ASSERT_DBG_PARAM

PreProcessor env

NA

Enable the params assert

USE_ASSERT_DBG_STATE

PreProcessor env

NA

Enable the state assert