HAL DMA2D Overview

Introducing DMA2D

group DMA2D_Introduction

  • This introduction is under development.

Module and files

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

Module and files diagram

Component diagram

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



package "HAL" {

    [HAL_SERVICE]

    [HAL_DMA2D]

}



package "Low Layer" {

    [LL_DMA2D]

    [CMSIS]

    [DMA2D Interrupt routine service]

}



package "HW" {

    [STM32_HW]

}



[Appli] --> [HAL_DMA2D] : HAL DMA2D API

[Appli] <-- [HAL_DMA2D] : DMA2D callback

[HAL_DMA2D] --> [LL_DMA2D] : LL DMA2D API

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

[HAL_DMA2D] <-- [DMA2D Interrupt routine service]

[LL_DMA2D] --> [CMSIS]:DMA2D register def

[STM32_HW] -u--> [DMA2D Interrupt routine service]: DMA2Dx Irq

[STM32_HW] <-u-- [LL_DMA2D] : DMA2D registers R/W

@enduml

Configuration table

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

group DMA2D_Configuration_Table

Configuration inside the DMA2D driver

Config defines

Description

Default value

Note

USE_HAL_DMA2D_MODULE

from hal_conf.h

1

When set, HAL DMA2D module is enabled

USE_HAL_DMA2D_REGISTER_CALLBACKS

from hal_conf.h

0

When set, enable the register callbacks

USE_HAL_DMA2D_CLK_ENABLE_MODEL

from hal_conf.h

HAL_CLK_ENABLE_NO

Enable the gating of the peripheral clock

USE_HAL_CHECK_PARAM

from hal_conf.h

0

When set, the vital parameters (pointers or sizes) are checked in runtime

USE_ASSERT_DBG_PARAM

from PreProcessor env

None

When defined, enable the params assert

USE_ASSERT_DBG_STATE

from PreProcessor env

None

When defined, enable the state assert

USE_HAL_DMA2D_USER_DATA

from hal_conf.h

0

When set, user data is defined in handle

USE_HAL_DMA2D_GET_LAST_ERRORS

from hal_conf.h

0

When set, user can get the last error code

USE_HAL_DMA2D_CLUT_IRQ

from hal_conf.h

0

When set, enable HAL_DMA2D_IRQHandler() handle CLUT interrupt