HAL MDF Overview

Introducing MDF

group MDF_Introduction

  • This introduction is under development.

Module and files

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

Module and files diagram

Component diagram

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



package "HAL" {

    [HAL_SERVICE]

    [HAL_MDF]

    [HAL_DMA]

}



package "Low Layer" {

    [CMSIS]

    [MDF Interrupt routine service]

    [DMA Interrupt routine service]

}



package "HW" {

    [STM32_HW]

}



[Appli] --> [HAL_MDF] : HAL MDF API

[Appli] <-- [HAL_MDF] : MDF callback

[HAL_MDF] -r-> [HAL_DMA] : HAL_DMA_StartPeriphXfer_IT_Opt\nHAL_DMA_Abort_IT

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

[HAL_MDF] <-- [MDF Interrupt routine service]

[HAL_MDF] <-r- [HAL_DMA]:Half transfer complete\nTransfer complete\nError callback\nAbort callback

[HAL_MDF] --> [CMSIS]:MDF register def

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

[STM32_HW] -u--> [MDF Interrupt routine service]: MDFx Irq

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

[STM32_HW] <-l-- [HAL_MDF] : MDF registers R/W

@enduml

Configuration table

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

group MDF_Configuration_Table

Configuration inside the HAL MDF driver

Config defines

Where

Default value

Note

USE_HAL_MDF_MODULE

hal_conf.h

1

Enable the HAL MDF module

USE_HAL_MDF_REGISTER_CALLBACKS

hal_conf.h

0

Allow user to define his own callback

USE_HAL_MDF_CLK_ENABLE_MODEL

hal_conf.h

HAL_CLK_ENABLE_NO

Enable the gating of the peripheral clock

USE_HAL_MDF_USER_DATA

hal_conf.h

0

Add an user data inside HAL MDF handle

USE_HAL_MDF_GET_LAST_ERRORS

hal_conf.h

0

Enable retrieving last processes error codes

USE_HAL_MDF_DMA

hal_conf.h

1

Enable DMA code inside HAL MDF

USE_HAL_CHECK_PARAM

hal_conf.h

0

Enable checking of vital parameters at runtime

USE_HAL_CHECK_PROCESS_STATE

hal_conf.h

0

Enable atomic access to process state check

USE_ASSERT_DBG_PARAM

PreProcessor env

NONE

Enable check parameters for HAL

USE_ASSERT_DBG_STATE

PreProcessor env

NONE

Enable check state for HAL