HAL HSP Overview ¶
Introducing HSP ¶
- group HSP_Introduction
-
The Hardware Abstraction Layer (HAL) for HSP provides an efficient interface to the Hardware Signal Processor (HSP). The HSP is a dedicated signal-processing subsystem designed to offload computation-intensive and time-critical operations from the CPU. It accelerates functions commonly used in demanding embedded applications such as motor control, digital power, metering, audio processing, real-time signal conditioning, and small convolutional neural networks.
The HSP is built around a dedicated, high-performance Signal Processor Engine (SPE) capable of operating in 32-bit floating point or 8-bit integer modes. The Signal Processor Engine executes HSP-specific microcode (also referred to as Firmware), part of which is embedded in private ROM, while a second part (FW RAM) must be dynamically loaded into RAM during initialization. This Firmware RAM is delivered through the HSP_Engine middleware.
The HSP also supports the loading of Plugins to:
patch or optimize existing processing function,
add new processing function.
The HAL HSP allows running processing functions in Accelerator mode or Sequencer mode. In Sequencer mode, it provides services to:
record a processing list (Sequence of processing functions)
attach a Processing List to a hardware trigger such as a DMA Transfer Complete, TIM Pulse…
Module and files ¶
The following diagram illustrates the HSP module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the HSP module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL HSP module, specifying their locations, default values, and descriptions:
- group HSP_Configuration_Table
-
Configuration inside the HSP driver ¶
Software configuration defined in stm32h7pxx_hal_conf.h:
Preprocessor flags
Default value
Comment
USE_HAL_HSP_MODULE
1
Enable HAL HSP driver module
USE_HAL_HSP_REGISTER_CALLBACKS
0
Allow the user to define their own callback
USE_HAL_CHECK_PARAM
0
Enable runtime parameter check
USE_HAL_HSP_CLK_ENABLE_MODEL
HAL_CLK_ENABLE_NO
Enable the gating of the peripheral clock
USE_HAL_CHECK_PROCESS_STATE
0
Enable atomicity of process state check
USE_HAL_HSP_USER_DATA
0
Add a user data inside HAL HSP handle
USE_HAL_HSP_GET_LAST_ERRORS
0
Enable retrieval of last processes error codes
USE_HAL_HSP_MSGBOX_GET_LAST_ERROR
0
Enable retrieval of last MSGBOX error code
USE_HAL_HSP_TRGIN_IT
0
Enable Trigger Input IT management
USE_HAL_HSP_STREAM_IT
0
Enable STREAM Buffer IT management
USE_HAL_HSP_TCU_IT
0
Enable Task Comparator Unit IT management
USE_HAL_HSP_TSC_IT
0
Enable TimeStamp Capture IT management
USE_HAL_HSP_PROCLIST_NOTIFICATION_IT
0
Enable Processing List Notification IT management
Software configuration defined in preprocessor environment:
Preprocessor flags
Default value
Comment
USE_ASSERT_DBG_PARAM
None
Enable check param for HAL
USE_ASSERT_DBG_STATE
None
Enable check state for HAL
Note
USE_HAL_HSP_TRGIN_IT to USE_HAL_HSP_PROCLIST_NOTIFICATION_IT are set to 0 by default to reduce the HAL handle footprint when these features are not used by the application.