HAL ADF Overview

Introducing ADF

group ADF_Introduction

  • This introduction is under development.

Module and files

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

Module and files diagram

Component diagram

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



package "HAL" {

    [HAL_SERVICE]

    [HAL_ADF]

    [HAL_DMA]

}



package "Low Layer" {

    [CMSIS]

    [ADF Interrupt routine service]

    [DMA Interrupt routine service]

}



package "HW" {

    [STM32_HW]

}



[Appli] --> [HAL_ADF] : HAL ADF API

[Appli] <-- [HAL_ADF] : ADF callback

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

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

[HAL_ADF] <-- [ADF Interrupt routine service]

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

[HAL_ADF] --> [CMSIS]:ADF register def

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

[STM32_HW] -u--> [ADF Interrupt routine service]: ADFx Irq

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

[STM32_HW] <-l-- [HAL_ADF] : ADF registers R/W

@enduml

Configuration table

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

group ADF_Configuration_Table

Configuration inside the HAL ADF driver

Config defines

Where

Default value

Note

USE_HAL_ADF_MODULE

hal_conf.h

1

Enable the HAL ADF module

USE_HAL_ADF_REGISTER_CALLBACKS

hal_conf.h

0

Allow user to define his own callback

USE_HAL_ADF_CLK_ENABLE_MODEL

hal_conf.h

HAL_CLK_ENABLE_NO

Enable the gating of the peripheral clock

USE_HAL_ADF_USER_DATA

hal_conf.h

0

Add an user data inside HAL ADF handle

USE_HAL_ADF_GET_LAST_ERRORS

hal_conf.h

0

Enable retrieving last processes error codes

USE_HAL_ADF_DMA

hal_conf.h

1

Enable DMA code inside HAL ADF

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