HAL CRS Overview

Introducing CRS

group CRS_Introduction

  • This introduction is under development.

Module and files

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

Module and files diagram

Component diagram

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



package "HAL" {

    [HAL_SERVICE]

    [HAL_CRS]

}



package "Low Layer" {

    [LL_CRS]

    [CMSIS]

    [CRS Interrupt Service Routine]

}



package "HW" {

    [STM32_HW]

}



[Appli] --> [HAL_CRS] : HAL CRS APIs

[Appli] <-- [HAL_CRS] : HAL CRS callbacks

[HAL_CRS] --> [LL_CRS] : LL CRS APIs

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

[HAL_CRS] <-- [CRS Interrupt Service Routine]

[LL_CRS] --> [CMSIS]:CRS registers definition

[STM32_HW] -u--> [CRS Interrupt Service Routine]: CRSx IRQ

[STM32_HW] <-u-- [LL_CRS] : CRS registers R/W

@enduml

Configuration table

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

group CRS_Configuration_Table

Configuration inside the CRS driver:

Config defines

Description

Default value

Note

USE_ASSERT_DBG_PARAM

from Preprocessor env

NONE

Enable check parameters for HAL

USE_ASSERT_DBG_STATE

from Preprocessor env

NONE

Enable check state for HAL

USE_HAL_CHECK_PARAM

from hal_conf.h

0U

When set,parameters are checked in runtime

USE_HAL_CRS_MODULE

from hal_conf.h

1U

Enable the HAL CRS module

USE_HAL_CRS_CLK_ENABLE_MODEL

from hal_conf.h

HAL_CLK_ENABLE_NO

Enable the gating of the peripheral clock

USE_HAL_CRS_GET_LAST_ERRORS

from hal_conf.h

0U

Enable the get last process error

USE_HAL_CRS_REGISTER_CALLBACKS

from hal_conf.h

0U

Allow user to define his own callback

USE_HAL_CRS_USER_DATA

from hal_conf.h

0U

When set, user data is defined in handle