HAL HASH Overview

Introducing HASH

group HASH_Introduction

  • This introduction is under development.

Module and files

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

Module and files diagram

Component diagram

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



package "HAL" {

    [HAL_HASH]

    [HAL_DMA]

}



package "Low Layer" {

    [CMSIS]

    [HASH Interrupt routine service]

    [DMA Interrupt routine service]

}



package "HW" {

    [STM32_HW]

}



[Appli] --> [HAL_HASH] : HAL HASH API

[Appli] <-- [HAL_HASH] : Status HASH API 

[HAL_HASH] -r-> [HAL_DMA] : Call DMA API

[HAL_HASH] <-r- [HAL_DMA]:Transfer complete\nError

[HAL_HASH] --> [CMSIS]:HASH register def

[HAL_HASH] --> [HAL_SERVICE]: using HAL_GetTick

[STM32_HW] <-u-- [HAL_HASH] : HASH registers R/W

[HAL_HASH] <-- [HASH Interrupt routine service]

[STM32_HW] -u--> [HASH Interrupt routine service]: HASH Irq

[STM32_HW] -u--> [DMA Interrupt routine service] : DMA Channel Irq

[HAL_DMA] <-d- [DMA Interrupt routine service]



@enduml

Configuration table

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

group HASH_Configuration_Table

Configuration inside the HASH driver

Config defines

Description

Default value

Note

PRODUCT

from IDE

NA

STM32U5XX

USE_ASSERT_DBG_PARAM

from the IDE

NONE

Allows to use the assert checks parameters.

USE_ASSERT_DBG_STATE

from the IDE

NONE

Allows to use the assert checks states.

USE_HAL_HASH_MODULE

from hal_conf.h

1

Enable the HAL HASH module

USE_HAL_CHECK_PARAM

from hal_conf.h

0

Allows to use the runtime checks parameters.

USE_HAL_HASH_REGISTER_CALLBACKS

from hal_conf.h

0

Allows to provide specific callback functions.

USE_HAL_HASH_GET_LAST_ERRORS

from hal_conf.h

0

Allows to get last errors codes.

USE_HAL_HASH_USER_DATA

from hal_conf.h

0

Allows to enable/disable user data.

USE_HAL_HASH_CLK_ENABLE_MODEL

from hal_conf.h

HAL_CLK_ENABLE_NO

Allows to enable the clock model for the HASH.

USE_HAL_HASH_DMA

from hal_conf.h

1

Allows to enable the HASH DMA module service.

USE_HAL_SECURE_CHECK_PARAM

from hal_conf.h

0

Allows to use the runtime check for sensitive APIs.

USE_HAL_CHECK_PROCESS_STATE

from hal_conf.h

0

Allows to use the load and store exclusive