HAL SRAM Overview

Introducing SRAM

group SRAM_Introduction

  • This introduction is under development.

Module and files

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

Module and files diagram

Component diagram

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

@startuml

!$use_sram_core = 1



!$use_hal_service = 1

!$use_hal_rcc = 1

!$use_hal_dma = 0



!$use_ll_rcc = 0



!$core = "FMC" + "_CORE"

!$sram = "SRAM"

!$SRAM = "FMC"

!$hal_api_itf = "HAL " + $sram + " API"

!$sram_name = "HAL_"+$sram

!$ll_sram = "LL_"+$sram



!$hal_dma_itf = "HAL_DMA_StartDirectXfer_IT_Opt()\nHAL_DMA_Abort_IT"

!$hal_rcc_itf = "\t\t\tHAL_RCC_"+$sram+"_GetClockFreq()\n\t\t\tHAL_RCC_"+$SRAM+"_EnableClock()"

!$hal_sram_itf = "Half transfer complete\nTransfer complete\nError callback\nAbort callback"

!$ll_sram_itf = "LL " + $sram +" API"



<style>

componentDiagram {

arrow {

FontSize 8

}

interface {

FontSize 8

}

}

</style>



title $sram Software Component Diagram



Package "Application Layer" #DarkMagenta {



component [Appli]

}



package "HAL" #DarkOrange {

[$sram_name]

!if ($use_hal_dma == 1)

interface "$hal_sram_itf" as HAL_SRAM_Interface

[$sram_name] -d- HAL_SRAM_Interface

!endif

interface "$hal_api_itf" as HAL_SRAM_APPLI_Interface

[$sram_name] -u- HAL_SRAM_APPLI_Interface  



!if ($use_hal_dma == 1)

  [HAL_DMA]

  interface "$hal_dma_itf" as HAL_DMA_Interface

  [HAL_DMA] -u- HAL_DMA_Interface

  [HAL_DMA] -u-( HAL_SRAM_Interface

  [$sram_name] --( HAL_DMA_Interface

!endif

!if ($use_hal_rcc == 1)

  [HAL_RCC]

  interface "$hal_rcc_itf" as HAL_RCC_Interface

  [HAL_RCC] -l- HAL_RCC_Interface

  [$sram_name] -r-( HAL_RCC_Interface

!endif

}



[Appli] -d-( HAL_SRAM_APPLI_Interface



!if ($use_sram_core ==1)

Package "Core Layer" #Lavender{

[$core]

interface "core API" as Core_api_itf

[$core] -u- Core_api_itf

}

[$sram_name] -d-( Core_api_itf

!endif

package "Low Layer" #Technology {



!if ($use_sram_ll == 1)

  [$ll_sram]

  interface "$ll_sram_itf" as LL_SRAM_Interface

  [$ll_sram]  -u- LL_SRAM_Interface

!endif 



[CMSIS-Devices]

!if ($use_ll_rcc == 1)

  [LL_RCC]

  interface "LL RCC API" as LL_RCC_API

  [LL_RCC] -u- LL_RCC_API

  [HAL_RCC] -d-(LL_RCC_API

!endif



!if ($use_hal_dma == 1)

  [DMA ISR]

  interface "DMA ISR" as DMA_ISR

  [DMA ISR] -u- DMA_ISR

!endif  

}



package "HW" #LightCyan {

[STM32_HW]

!if ($use_hal_dma == 1)

interface "DMAx_IRQ_Ch" as DMA_IRQ_CH

[STM32_HW] -u- DMA_IRQ_CH

[DMA ISR] -d-( DMA_IRQ_CH

[HAL_DMA] --( DMA_ISR

!endif

}

!if ($use_sram_ll == 1)

[$sram_name] -d-( LL_SRAM_Interface

[$ll_sram] .r.> [CMSIS-Devices]: $sram register def

[STM32_HW] <.u. [$ll_sram] : $sram registers R/W

!else

!if ($use_sram_core == 1)

[$core] .d.> [CMSIS-Devices]: $sram register def

[STM32_HW] <.l. [$core] : $sram registers R/W

!else

[$sram_name] .d.> [CMSIS-Devices]: $sram register def

[STM32_HW] <.l. [$sram_name] : $sram registers R/W

!endif

!endif

!if ($use_ll_rcc == 1)

[STM32_HW] <.u. [LL_RCC] : RCC registers R/W

!endif



@enduml

Configuration table

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

group SRAM_Configuration_Table

Configuration inside the SRAM driver

Config defines

Description

Default value

Note

USE_ASSERT_DBG_PARAM

from IDE

NA

Allows to use the assert check parameters.

USE_ASSERT_DBG_STATE

from IDE

NA

Allows to use the assert check states.

USE_HAL_CHECK_PARAM

from hal_conf.h

0U

Allows to use the run-time check parameters.

USE_HAL_SRAM_MODULE

from hal_conf.h

1U

Allows to use the HAL SRAM module.

USE_FMC_CLK_ENABLE_MODEL

from hal_conf.h

HAL_CLK_ENABLE_NO

Allows to enable the FMC clock.

USE_HAL_SRAM_USER_DATA

from hal_conf.h

0U

Allows to use user data.