HAL XSPI Functions ¶
Initialization and de-initialization functions ¶
- group XSPI_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the XSPIx peripheral:
-
Call the function HAL_XSPI_Init() to initialize the selected HAL XSPI handle and associate an XSPI peripheral instance
-
Call the function HAL_XSPI_DeInit() to de-initialize the given HAL XSPI instance by stopping any ongoing process and resetting the state machine
Functions
-
hal_status_t
HAL_XSPI_Init
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_t
instance
)
¶
-
Initialize the XSPI according to the associated instance.
Note
The XSPI clock can be activated within the HAL_XSPI_Init() function by setting the USE_XSPI_CLK_ENABLE_MODEL flag to HAL_CLK_ENABLE_XSPI_ONLY in the configuration file ** stm32tnxx_hal_conf.h **.
- Parameters :
-
-
instance – XSPI instance, can be one of the XSPI instances as defined in the CMSIS device header file.
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – hxspi instance has been correctly Initialized.
-
-
void
HAL_XSPI_DeInit
(
hal_xspi_handle_t
*
hxspi
)
¶
-
De-Initialize the XSPI peripheral.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
- group XSPI_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the XSPIx peripheral:
-
Call the function HAL_XSPI_Init() to initialize the selected HAL XSPI handle and associate an XSPI peripheral instance
-
Call the function HAL_XSPI_DeInit() to de-initialize the given HAL XSPI instance by stopping any ongoing process and resetting the state machine
Functions
-
hal_status_t
HAL_XSPI_Init
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_t
instance
)
-
Initialize the XSPI according to the associated instance.
Note
The XSPI clock can be activated within the HAL_XSPI_Init() function by setting the USE_XSPI_CLK_ENABLE_MODEL flag to HAL_CLK_ENABLE_XSPI_ONLY in the configuration file ** stm32tnxx_hal_conf.h **.
- Parameters :
-
-
instance – XSPI instance, can be one of the XSPI instances as defined in the CMSIS device header file.
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – hxspi instance has been correctly Initialized.
-
-
void
HAL_XSPI_DeInit
(
hal_xspi_handle_t
*
hxspi
)
-
De-Initialize the XSPI peripheral.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
- group XSPI_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the XSPIx peripheral:
-
Call the function HAL_XSPI_Init() to initialize the selected HAL XSPI handle and associate an XSPI peripheral instance
-
Call the function HAL_XSPI_DeInit() to de-initialize the given HAL XSPI instance by stopping any ongoing process and resetting the state machine
Functions
-
hal_status_t
HAL_XSPI_Init
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_t
instance
)
-
Initialize the XSPI according to the associated instance.
Note
The XSPI clock can be activated within the HAL_XSPI_Init() function by setting the USE_XSPI_CLK_ENABLE_MODEL flag to HAL_CLK_ENABLE_XSPI_ONLY in the configuration file ** stm32tnxx_hal_conf.h **.
- Parameters :
-
-
instance – XSPI instance, can be one of the XSPI instances as defined in the CMSIS device header file.
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – hxspi instance has been correctly Initialized.
-
-
void
HAL_XSPI_DeInit
(
hal_xspi_handle_t
*
hxspi
)
-
De-Initialize the XSPI peripheral.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
XSPI Configuration functions ¶
- group XSPI_Exported_Functions_Group2
-
This subsection provides a set of functions allowing to configure the XSPIx peripheral:
There are 3 categories of HAL configuration APIs
-
Global configuration APIs:
-
HAL_XSPI_SetConfig() Allowing to set the HAL peripheral instance into a ready to use state (idle) according to the user parameters
-
HAL_XSPI_GetConfig() Allowing to retrieve the HAL peripheral configuration
-
-
Unitary configuration APIs:
-
HAL_XSPI_SetFifoThreshold() Allowing to configure the Fifo threshold according to the user parameters
-
HAL_XSPI_GetFifoThreshold() Allowing to retrieve the Fifo threshold configuration
-
HAL_XSPI_SetPrescaler() Allowing to configure the Prescaler according to the user parameters
-
HAL_XSPI_GetPrescaler() Allowing to retrieve the Prescaler configuration
-
HAL_XSPI_SetMemorySize() Allowing to configure the Size of XSPI memory according to the user parameters
-
HAL_XSPI_GetMemorySize() Allowing to retrieve the Size of XSPI memory configuration
-
HAL_XSPI_SetMemoryType() Allowing to configure the Type of XSPI memory according to the user parameters
-
HAL_XSPI_GetMemoryType() Allowing to retrieve the Type of XSPI memory configuration
-
HAL_XSPI_EnableFreeRunningClock() Allowing to enable the free running clock
-
HAL_XSPI_DisableFreeRunningClock() Allowing to disable the free running clock
-
HAL_XSPI_IsEnabledFreeRunningClock() Allowing to check the state of free running clock, whether it is enable or not
-
HAL_XSPI_EnableSIOO() Allowing to enable the Send Instruction Only Once mode
-
HAL_XSPI_DisableSIOO() Allowing to disable the Send Instruction Only Once mode
-
HAL_XSPI_IsEnabledSIOO() Allowing to check the state of Send Instruction Only Once mode
-
These APIs are intended to dynamically modify/Retrieve a unitary item meaning that a global config has been already applied Unitary config APIs must check first if we are in IDLE state (meaning a global config was applied) in order to modify or retrieve a single item Items that can alter other config parameters must not be handled within unitary APIs
Functions
-
hal_status_t
HAL_XSPI_SetConfig
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_config_t
*
p_config
)
¶
-
Configure the XSPI according to the user parameters.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_config – Pointer to the hal_xspi_config_t structure.
-
- Return values :
-
-
HAL_ERROR – XSPI instance is already configured and can not be modified.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
void
HAL_XSPI_GetConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_config_t
*
p_config
)
¶
-
Get the XSPI configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_config – Pointer to the hal_xspi_config_t structure.
-
-
hal_status_t
HAL_XSPI_SetFifoThreshold
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
threshold
)
¶
-
Set XSPI Fifo threshold.
- Parameters :
-
-
hxspi – XSPI handle.
-
threshold – Threshold of the Fifo can be a value from 0 to 31.
-
- Return values :
-
HAL_OK – Fifo threshold has been correctly configured.
-
uint32_t
HAL_XSPI_GetFifoThreshold
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Get XSPI Fifo threshold.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value Fifo threshold.
-
hal_status_t
HAL_XSPI_SetPrescaler
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
clk_prescaler
)
¶
-
Set XSPI Clock Prescaler.
- Parameters :
-
-
hxspi – XSPI handle.
-
clk_prescaler – Prescaler generating the external clock can be a value from 0 to 255.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – Clock Prescaler has been correctly configured.
-
-
uint32_t
HAL_XSPI_GetPrescaler
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Get XSPI Clock Prescaler.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value clock prescaler.
-
hal_status_t
HAL_XSPI_SetMemorySize
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_memory_size_t
size
)
¶
-
Configure device memory size.
- Parameters :
-
-
hxspi – XSPI handle.
-
size – The size of the external device connected to the XSPI.
-
- Return values :
-
HAL_OK – Size has been correctly configured.
-
hal_xspi_memory_size_t
HAL_XSPI_GetMemorySize
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Get XSPI Memory Size.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value device memory size.
-
hal_status_t
HAL_XSPI_SetMemoryType
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_memory_type_t
type
)
¶
-
Set XSPI Memory Type.
- Parameters :
-
-
hxspi – XSPI handle.
-
type – The type of the external device connected to the XSPI.
-
- Return values :
-
HAL_OK – Type has been correctly configured.
-
hal_xspi_memory_type_t
HAL_XSPI_GetMemoryType
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Get XSPI Memory Type.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the type of the external device connected to the XSPI.
-
hal_status_t
HAL_XSPI_EnableFreeRunningClock
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Enable the free running clock.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – free running clock has been correctly enabled.
-
hal_status_t
HAL_XSPI_DisableFreeRunningClock
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Disable the free running clock.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – free running clock has been correctly disabled.
-
hal_xspi_free_running_clk_status_t
HAL_XSPI_IsEnabledFreeRunningClock
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Check whether the free running clock is enabled or disabled.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the state of the free running clock.
-
hal_status_t
HAL_XSPI_EnableSIOO
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Enable the Send Instruction Only Once mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – Send Instruction Only Once mode has been correctly enabled.
-
hal_status_t
HAL_XSPI_DisableSIOO
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Disable the Send Instruction Only Once mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – Send Instruction Only Once mode has been correctly disabled.
-
hal_xspi_sioo_status_t
HAL_XSPI_IsEnabledSIOO
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Check whether the Send Instruction Only Once mode is enabled or disabled.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the state of the Send Instruction Only Once mode.
-
- group XSPI_Exported_Functions_Group2
-
This subsection provides a set of functions allowing to configure the XSPIx peripheral:
There are 3 categories of HAL configuration APIs
-
Global configuration APIs:
-
HAL_XSPI_SetConfig() Allowing to set the HAL peripheral instance into a ready to use state (idle) according to the user parameters
-
HAL_XSPI_GetConfig() Allowing to retrieve the HAL peripheral configuration
-
-
Unitary configuration APIs:
-
HAL_XSPI_SetFifoThreshold() Allowing to configure the Fifo threshold according to the user parameters
-
HAL_XSPI_GetFifoThreshold() Allowing to retrieve the Fifo threshold configuration
-
HAL_XSPI_SetPrescaler() Allowing to configure the Prescaler according to the user parameters
-
HAL_XSPI_GetPrescaler() Allowing to retrieve the Prescaler configuration
-
HAL_XSPI_SetMemorySize() Allowing to configure the Size of XSPI memory according to the user parameters
-
HAL_XSPI_GetMemorySize() Allowing to retrieve the Size of XSPI memory configuration
-
HAL_XSPI_SetMemoryType() Allowing to configure the Type of XSPI memory according to the user parameters
-
HAL_XSPI_GetMemoryType() Allowing to retrieve the Type of XSPI memory configuration
-
HAL_XSPI_EnableFreeRunningClock() Allowing to enable the free running clock
-
HAL_XSPI_DisableFreeRunningClock() Allowing to disable the free running clock
-
HAL_XSPI_IsEnabledFreeRunningClock() Allowing to check the state of free running clock, whether it is enable or not
-
HAL_XSPI_EnableSIOO() Allowing to enable the Send Instruction Only Once mode
-
HAL_XSPI_DisableSIOO() Allowing to disable the Send Instruction Only Once mode
-
HAL_XSPI_IsEnabledSIOO() Allowing to check the state of Send Instruction Only Once mode
-
These APIs are intended to dynamically modify/Retrieve a unitary item meaning that a global config has been already applied Unitary config APIs must check first if we are in IDLE state (meaning a global config was applied) in order to modify or retrieve a single item Items that can alter other config parameters must not be handled within unitary APIs
Functions
-
hal_status_t
HAL_XSPI_SetConfig
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_config_t
*
p_config
)
-
Configure the XSPI according to the user parameters.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_config – Pointer to the hal_xspi_config_t structure.
-
- Return values :
-
-
HAL_ERROR – XSPI instance is already configured and can not be modified.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
void
HAL_XSPI_GetConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_config_t
*
p_config
)
-
Get the XSPI configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_config – Pointer to the hal_xspi_config_t structure.
-
-
hal_status_t
HAL_XSPI_SetFifoThreshold
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
threshold
)
-
Set XSPI Fifo threshold.
- Parameters :
-
-
hxspi – XSPI handle.
-
threshold – Threshold of the Fifo can be a value from 0 to 31.
-
- Return values :
-
HAL_OK – Fifo threshold has been correctly configured.
-
uint32_t
HAL_XSPI_GetFifoThreshold
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Fifo threshold.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value Fifo threshold.
-
hal_status_t
HAL_XSPI_SetPrescaler
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
clk_prescaler
)
-
Set XSPI Clock Prescaler.
- Parameters :
-
-
hxspi – XSPI handle.
-
clk_prescaler – Prescaler generating the external clock can be a value from 0 to 255.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – Clock Prescaler has been correctly configured.
-
-
uint32_t
HAL_XSPI_GetPrescaler
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Clock Prescaler.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value clock prescaler.
-
hal_status_t
HAL_XSPI_SetMemorySize
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_memory_size_t
size
)
-
Configure device memory size.
- Parameters :
-
-
hxspi – XSPI handle.
-
size – The size of the external device connected to the XSPI.
-
- Return values :
-
HAL_OK – Size has been correctly configured.
-
hal_xspi_memory_size_t
HAL_XSPI_GetMemorySize
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Memory Size.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value device memory size.
-
hal_status_t
HAL_XSPI_SetMemoryType
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_memory_type_t
type
)
-
Set XSPI Memory Type.
- Parameters :
-
-
hxspi – XSPI handle.
-
type – The type of the external device connected to the XSPI.
-
- Return values :
-
HAL_OK – Type has been correctly configured.
-
hal_xspi_memory_type_t
HAL_XSPI_GetMemoryType
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Memory Type.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the type of the external device connected to the XSPI.
-
hal_status_t
HAL_XSPI_EnableFreeRunningClock
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the free running clock.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – free running clock has been correctly enabled.
-
hal_status_t
HAL_XSPI_DisableFreeRunningClock
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the free running clock.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – free running clock has been correctly disabled.
-
hal_xspi_free_running_clk_status_t
HAL_XSPI_IsEnabledFreeRunningClock
(
const
hal_xspi_handle_t
*
hxspi
)
-
Check whether the free running clock is enabled or disabled.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the state of the free running clock.
-
hal_status_t
HAL_XSPI_EnableSIOO
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the Send Instruction Only Once mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – Send Instruction Only Once mode has been correctly enabled.
-
hal_status_t
HAL_XSPI_DisableSIOO
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the Send Instruction Only Once mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – Send Instruction Only Once mode has been correctly disabled.
-
hal_xspi_sioo_status_t
HAL_XSPI_IsEnabledSIOO
(
const
hal_xspi_handle_t
*
hxspi
)
-
Check whether the Send Instruction Only Once mode is enabled or disabled.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the state of the Send Instruction Only Once mode.
-
- group XSPI_Exported_Functions_Group2
-
This subsection provides a set of functions allowing to configure the XSPIx peripheral:
There are 3 categories of HAL configuration APIs
-
Global configuration APIs:
-
HAL_XSPI_SetConfig() Allowing to set the HAL peripheral instance into a ready to use state (idle) according to the user parameters
-
HAL_XSPI_GetConfig() Allowing to retrieve the HAL peripheral configuration
-
-
Unitary configuration APIs:
-
HAL_XSPI_SetFifoThreshold() Allowing to configure the Fifo threshold according to the user parameters
-
HAL_XSPI_GetFifoThreshold() Allowing to retrieve the Fifo threshold configuration
-
HAL_XSPI_SetPrescaler() Allowing to configure the Prescaler according to the user parameters
-
HAL_XSPI_GetPrescaler() Allowing to retrieve the Prescaler configuration
-
HAL_XSPI_SetMemorySize() Allowing to configure the Size of XSPI memory according to the user parameters
-
HAL_XSPI_GetMemorySize() Allowing to retrieve the Size of XSPI memory configuration
-
HAL_XSPI_SetMemoryType() Allowing to configure the Type of XSPI memory according to the user parameters
-
HAL_XSPI_GetMemoryType() Allowing to retrieve the Type of XSPI memory configuration
-
HAL_XSPI_EnableFreeRunningClock() Allowing to enable the free running clock
-
HAL_XSPI_DisableFreeRunningClock() Allowing to disable the free running clock
-
HAL_XSPI_IsEnabledFreeRunningClock() Allowing to check the state of free running clock, whether it is enable or not
-
HAL_XSPI_EnableSIOO() Allowing to enable the Send Instruction Only Once mode
-
HAL_XSPI_DisableSIOO() Allowing to disable the Send Instruction Only Once mode
-
HAL_XSPI_IsEnabledSIOO() Allowing to check the state of Send Instruction Only Once mode
-
These APIs are intended to dynamically modify/Retrieve a unitary item meaning that a global config has been already applied Unitary config APIs must check first if we are in IDLE state (meaning a global config was applied) in order to modify or retrieve a single item Items that can alter other config parameters must not be handled within unitary APIs
Functions
-
hal_status_t
HAL_XSPI_SetConfig
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_config_t
*
p_config
)
-
Configure the XSPI according to the user parameters.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_config – Pointer to the hal_xspi_config_t structure.
-
- Return values :
-
-
HAL_ERROR – XSPI instance is already configured and can not be modified.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
void
HAL_XSPI_GetConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_config_t
*
p_config
)
-
Get the XSPI configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_config – Pointer to the hal_xspi_config_t structure.
-
-
hal_status_t
HAL_XSPI_SetFifoThreshold
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
threshold
)
-
Set XSPI Fifo threshold.
- Parameters :
-
-
hxspi – XSPI handle.
-
threshold – Threshold of the Fifo can be a value from 0 to 31.
-
- Return values :
-
HAL_OK – Fifo threshold has been correctly configured.
-
uint32_t
HAL_XSPI_GetFifoThreshold
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Fifo threshold.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value Fifo threshold.
-
hal_status_t
HAL_XSPI_SetPrescaler
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
clk_prescaler
)
-
Set XSPI Clock Prescaler.
- Parameters :
-
-
hxspi – XSPI handle.
-
clk_prescaler – Prescaler generating the external clock can be a value from 0 to 255.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – Clock Prescaler has been correctly configured.
-
-
uint32_t
HAL_XSPI_GetPrescaler
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Clock Prescaler.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value clock prescaler.
-
hal_status_t
HAL_XSPI_SetMemorySize
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_memory_size_t
size
)
-
Configure device memory size.
- Parameters :
-
-
hxspi – XSPI handle.
-
size – The size of the external device connected to the XSPI.
-
- Return values :
-
HAL_OK – Size has been correctly configured.
-
hal_xspi_memory_size_t
HAL_XSPI_GetMemorySize
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Memory Size.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the value device memory size.
-
hal_status_t
HAL_XSPI_SetMemoryType
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_memory_type_t
type
)
-
Set XSPI Memory Type.
- Parameters :
-
-
hxspi – XSPI handle.
-
type – The type of the external device connected to the XSPI.
-
- Return values :
-
HAL_OK – Type has been correctly configured.
-
hal_xspi_memory_type_t
HAL_XSPI_GetMemoryType
(
const
hal_xspi_handle_t
*
hxspi
)
-
Get XSPI Memory Type.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the type of the external device connected to the XSPI.
-
hal_status_t
HAL_XSPI_EnableFreeRunningClock
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the free running clock.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – free running clock has been correctly enabled.
-
hal_status_t
HAL_XSPI_DisableFreeRunningClock
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the free running clock.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – free running clock has been correctly disabled.
-
hal_xspi_free_running_clk_status_t
HAL_XSPI_IsEnabledFreeRunningClock
(
const
hal_xspi_handle_t
*
hxspi
)
-
Check whether the free running clock is enabled or disabled.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the state of the free running clock.
-
hal_status_t
HAL_XSPI_EnableSIOO
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the Send Instruction Only Once mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – Send Instruction Only Once mode has been correctly enabled.
-
hal_status_t
HAL_XSPI_DisableSIOO
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the Send Instruction Only Once mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
HAL_OK – Send Instruction Only Once mode has been correctly disabled.
-
hal_xspi_sioo_status_t
HAL_XSPI_IsEnabledSIOO
(
const
hal_xspi_handle_t
*
hxspi
)
-
Check whether the Send Instruction Only Once mode is enabled or disabled.
- Parameters :
-
hxspi – XSPI handle.
- Returns :
-
Retrieve the state of the Send Instruction Only Once mode.
-
XSPI Command and IO operation functions ¶
- group XSPI_Exported_Functions_Group3
-
This subsection provides a set of functions allowing to manage the data transfer from/to external memory
-
HAL_XSPI_StartMemoryMappedMode() Allowing to start a XSPI Memory-Mapped mode according to the user parameters
-
HAL_XSPI_StopMemoryMappedMode() Allowing to stop a XSPI Memory-Mapped mode
There are 3 categories of HAL functions APIs to manage the data transfer
-
Blocking mode: Polling
-
Non-Blocking mode: IT
-
Non-Blocking mode: DMA
Functions
-
hal_status_t
HAL_XSPI_StartMemoryMappedMode
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_memory_mapped_config_t
*
p_config
)
¶
-
Start the Memory Mapped mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the memory mapped configuration information.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
hal_status_t
HAL_XSPI_StopMemoryMappedMode
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Stop the Memory Mapped mode.
Note
This function is used only in Memory mapped Mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
hal_status_t
HAL_XSPI_SendRegularCmd
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_regular_cmd_t
*
p_cmd
,
uint32_t
timeout_ms
)
¶
-
Set the Regular command configuration.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure that contains the Regular command configuration information.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_SendRegularCmd_IT
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_regular_cmd_t
*
p_cmd
)
¶
-
Set the Regular command configuration in interrupt mode.
Note
This function is used only in Indirect Read or Write Modes.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure that contains the Regular command configuration information.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_SendHyperbusCmd
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_hyperbus_cmd_t
*
p_cmd
,
uint32_t
timeout_ms
)
¶
-
Set the Hyperbus command configuration.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure containing the Hyperbus command.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_ExecRegularAutoPoll
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_auto_polling_config_t
*
p_config
,
uint32_t
timeout_ms
)
¶
-
Execute the XSPI Automatic Polling Mode in blocking mode.
Note
This function is used only in Automatic Polling Mode for Regular protocol.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the polling configuration information.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_ExecRegularAutoPoll_IT
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_auto_polling_config_t
*
p_config
)
¶
-
Execute the XSPI Automatic Polling Mode in non-blocking mode.
Note
This function is used only in Automatic Polling Mode for Regular protocol.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the polling configuration information
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
,
uint32_t
timeout_ms
)
¶
-
Transmit an amount of data in blocking mode.
Note
This function is used only in Indirect Write Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Transfer completed.
-
-
hal_status_t
HAL_XSPI_Receive
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
,
uint32_t
timeout_ms
)
¶
-
Receive an amount of data in blocking mode.
Note
This function is used only in Indirect Read Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_IT
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
)
¶
-
Send an amount of data in non-blocking mode with interrupt.
Note
This function is used only in Indirect Write Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Transfer completed.
-
-
hal_status_t
HAL_XSPI_Receive_IT
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
)
¶
-
Receive an amount of data in non-blocking mode with interrupt.
Note
This function is used only in Indirect Read Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_DMA
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
)
¶
-
Send an amount of data in non-blocking mode with DMA.
Note
This function is used only in Indirect Write Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_DMA_Opt
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
,
uint32_t
interrupts
)
¶
-
Send an amount of data with DMA in interrupt mode with optional interrupts.
Note
This function is used only in Indirect Write Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
interrupts – Specifies the DMA optional interrupt to be enable. This parameter can be one of Optional interrupts group.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Receive_DMA
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
)
¶
-
Receive an amount of data in non-blocking mode with DMA.
Note
This function is used only in Indirect Read Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Receive_DMA_Opt
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
,
uint32_t
interrupts
)
¶
-
Receive an amount of data with DMA in interrupt mode with optional interrupts.
Note
This function is used only in Indirect Read Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
interrupts – Specifies the DMA optional interrupt to be enable This parameter can be one of Optional interrupts group.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Abort
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
timeout_ms
)
¶
-
Abort the current transmission.
- Parameters :
-
-
hxspi – XSPI handle.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Abort_IT
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Abort the current transmission (non-blocking function).
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – Operation completed.
-
-
- group XSPI_Exported_Functions_Group3
-
This subsection provides a set of functions allowing to manage the data transfer from/to external memory
-
HAL_XSPI_StartMemoryMappedMode() Allowing to start a XSPI Memory-Mapped mode according to the user parameters
-
HAL_XSPI_StopMemoryMappedMode() Allowing to stop a XSPI Memory-Mapped mode
There are 3 categories of HAL functions APIs to manage the data transfer
-
Blocking mode: Polling
-
Non-Blocking mode: IT
-
Non-Blocking mode: DMA
Functions
-
hal_status_t
HAL_XSPI_StartMemoryMappedMode
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_memory_mapped_config_t
*
p_config
)
-
Start the Memory Mapped mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the memory mapped configuration information.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
hal_status_t
HAL_XSPI_StopMemoryMappedMode
(
hal_xspi_handle_t
*
hxspi
)
-
Stop the Memory Mapped mode.
Note
This function is used only in Memory mapped Mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
hal_status_t
HAL_XSPI_SendRegularCmd
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_regular_cmd_t
*
p_cmd
,
uint32_t
timeout_ms
)
-
Set the Regular command configuration.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure that contains the Regular command configuration information.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_SendRegularCmd_IT
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_regular_cmd_t
*
p_cmd
)
-
Set the Regular command configuration in interrupt mode.
Note
This function is used only in Indirect Read or Write Modes.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure that contains the Regular command configuration information.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_SendHyperbusCmd
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_hyperbus_cmd_t
*
p_cmd
,
uint32_t
timeout_ms
)
-
Set the Hyperbus command configuration.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure containing the Hyperbus command.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_ExecRegularAutoPoll
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_auto_polling_config_t
*
p_config
,
uint32_t
timeout_ms
)
-
Execute the XSPI Automatic Polling Mode in blocking mode.
Note
This function is used only in Automatic Polling Mode for Regular protocol.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the polling configuration information.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_ExecRegularAutoPoll_IT
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_auto_polling_config_t
*
p_config
)
-
Execute the XSPI Automatic Polling Mode in non-blocking mode.
Note
This function is used only in Automatic Polling Mode for Regular protocol.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the polling configuration information
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
,
uint32_t
timeout_ms
)
-
Transmit an amount of data in blocking mode.
Note
This function is used only in Indirect Write Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Transfer completed.
-
-
hal_status_t
HAL_XSPI_Receive
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
,
uint32_t
timeout_ms
)
-
Receive an amount of data in blocking mode.
Note
This function is used only in Indirect Read Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_IT
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
)
-
Send an amount of data in non-blocking mode with interrupt.
Note
This function is used only in Indirect Write Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Transfer completed.
-
-
hal_status_t
HAL_XSPI_Receive_IT
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
)
-
Receive an amount of data in non-blocking mode with interrupt.
Note
This function is used only in Indirect Read Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_DMA
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
)
-
Send an amount of data in non-blocking mode with DMA.
Note
This function is used only in Indirect Write Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_DMA_Opt
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
,
uint32_t
interrupts
)
-
Send an amount of data with DMA in interrupt mode with optional interrupts.
Note
This function is used only in Indirect Write Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
interrupts – Specifies the DMA optional interrupt to be enable. This parameter can be one of Optional interrupts group.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Receive_DMA
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
)
-
Receive an amount of data in non-blocking mode with DMA.
Note
This function is used only in Indirect Read Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Receive_DMA_Opt
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
,
uint32_t
interrupts
)
-
Receive an amount of data with DMA in interrupt mode with optional interrupts.
Note
This function is used only in Indirect Read Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
interrupts – Specifies the DMA optional interrupt to be enable This parameter can be one of Optional interrupts group.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Abort
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
timeout_ms
)
-
Abort the current transmission.
- Parameters :
-
-
hxspi – XSPI handle.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Abort_IT
(
hal_xspi_handle_t
*
hxspi
)
-
Abort the current transmission (non-blocking function).
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – Operation completed.
-
-
- group XSPI_Exported_Functions_Group3
-
This subsection provides a set of functions allowing to manage the data transfer from/to external memory
-
HAL_XSPI_StartMemoryMappedMode() Allowing to start a XSPI Memory-Mapped mode according to the user parameters
-
HAL_XSPI_StopMemoryMappedMode() Allowing to stop a XSPI Memory-Mapped mode
There are 3 categories of HAL functions APIs to manage the data transfer
-
Blocking mode: Polling
-
Non-Blocking mode: IT
-
Non-Blocking mode: DMA
Functions
-
hal_status_t
HAL_XSPI_StartMemoryMappedMode
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_memory_mapped_config_t
*
p_config
)
-
Start the Memory Mapped mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the memory mapped configuration information.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
hal_status_t
HAL_XSPI_StopMemoryMappedMode
(
hal_xspi_handle_t
*
hxspi
)
-
Stop the Memory Mapped mode.
Note
This function is used only in Memory mapped Mode.
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – XSPI instance has been correctly configured.
-
-
hal_status_t
HAL_XSPI_SendRegularCmd
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_regular_cmd_t
*
p_cmd
,
uint32_t
timeout_ms
)
-
Set the Regular command configuration.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure that contains the Regular command configuration information.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_SendRegularCmd_IT
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_regular_cmd_t
*
p_cmd
)
-
Set the Regular command configuration in interrupt mode.
Note
This function is used only in Indirect Read or Write Modes.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure that contains the Regular command configuration information.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_SendHyperbusCmd
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_hyperbus_cmd_t
*
p_cmd
,
uint32_t
timeout_ms
)
-
Set the Hyperbus command configuration.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_cmd – Structure containing the Hyperbus command.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_ExecRegularAutoPoll
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_auto_polling_config_t
*
p_config
,
uint32_t
timeout_ms
)
-
Execute the XSPI Automatic Polling Mode in blocking mode.
Note
This function is used only in Automatic Polling Mode for Regular protocol.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the polling configuration information.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_ExecRegularAutoPoll_IT
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_auto_polling_config_t
*
p_config
)
-
Execute the XSPI Automatic Polling Mode in non-blocking mode.
Note
This function is used only in Automatic Polling Mode for Regular protocol.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_config – Pointer to structure that contains the polling configuration information
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
,
uint32_t
timeout_ms
)
-
Transmit an amount of data in blocking mode.
Note
This function is used only in Indirect Write Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Transfer completed.
-
-
hal_status_t
HAL_XSPI_Receive
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
,
uint32_t
timeout_ms
)
-
Receive an amount of data in blocking mode.
Note
This function is used only in Indirect Read Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_IT
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
)
-
Send an amount of data in non-blocking mode with interrupt.
Note
This function is used only in Indirect Write Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Transfer completed.
-
-
hal_status_t
HAL_XSPI_Receive_IT
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
)
-
Receive an amount of data in non-blocking mode with interrupt.
Note
This function is used only in Indirect Read Mode.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_DMA
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
)
-
Send an amount of data in non-blocking mode with DMA.
Note
This function is used only in Indirect Write Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Transmit_DMA_Opt
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_data
,
uint32_t
interrupts
)
-
Send an amount of data with DMA in interrupt mode with optional interrupts.
Note
This function is used only in Indirect Write Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
interrupts – Specifies the DMA optional interrupt to be enable. This parameter can be one of Optional interrupts group.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Receive_DMA
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
)
-
Receive an amount of data in non-blocking mode with DMA.
Note
This function is used only in Indirect Read Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Receive_DMA_Opt
(
hal_xspi_handle_t
*
hxspi
,
void
*
p_data
,
uint32_t
interrupts
)
-
Receive an amount of data with DMA in interrupt mode with optional interrupts.
Note
This function is used only in Indirect Read Mode.
Warning
If DMA peripheral access is configured as halfword, the number of data and the fifo threshold must be aligned on halfword.
Warning
If DMA peripheral access is configured as word, the number of data and the fifo threshold must be aligned on word.
- Parameters :
-
-
hxspi – XSPI handle.
-
p_data – Pointer to data buffer.
-
interrupts – Specifies the DMA optional interrupt to be enable This parameter can be one of Optional interrupts group.
-
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_BUSY – XSPI state is active when calling this API.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Abort
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
timeout_ms
)
-
Abort the current transmission.
- Parameters :
-
-
hxspi – XSPI handle.
-
timeout_ms – Timeout duration.
-
- Return values :
-
-
HAL_TIMEOUT – In case of user timeout.
-
HAL_OK – Operation completed.
-
-
hal_status_t
HAL_XSPI_Abort_IT
(
hal_xspi_handle_t
*
hxspi
)
-
Abort the current transmission (non-blocking function).
- Parameters :
-
hxspi – XSPI handle.
- Return values :
-
-
HAL_ERROR – An error has occurred.
-
HAL_OK – Operation completed.
-
-
IRQHandler, link DMA and Callbacks functions ¶
- group XSPI_Exported_Functions_Group4
-
This subsection provides a set callback functions allowing to manage the data transfer from/to external memory
Functions
-
void
HAL_XSPI_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Handle the XSPI interrupt request.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
void
HAL_XSPI_ErrorCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Error callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_AbortCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Abort completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_FifoThresholdCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
FIFO Threshold callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_CmdCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Command completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_RxCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Rx Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_TxCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Tx Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_RxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Rx Half Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_TxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Tx Half Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_StatusMatchCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Status Match callback.
- Parameters :
-
hxspi – XSPI handle.
-
hal_status_t
HAL_XSPI_RegisterErrorCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Error Callback to be used instead of the weak HAL_XSPI_ErrorCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the error callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterCmdCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI command complete Callback TO be used instead of the weak HAL_XSPI_CmdCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the command complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterRxCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Receive complete Callback TO be used instead of the weak HAL_XSPI_RxCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the receive complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterTxCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Transfer complete Callback TO be used instead of the weak HAL_XSPI_TxCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the transfer complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterRxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Receive Half complete Callback TO be used instead of the weak HAL_XSPI_RxHalfCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the half receive complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterTxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Transfer Half complete Callback TO be used instead of the weak HAL_XSPI_TxHalfCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the half transfer complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterStatusMatchCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Status Match Callback TO be used instead of the weak HAL_XSPI_StatusMatchCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the status match callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterAbortCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Abort complete Callback TO be used instead of the weak HAL_XSPI_AbortCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the abort complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterFifoThresholdCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI Fifo Threshold Callback TO be used instead of the weak HAL_XSPI_FifoThresholdCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the fifo threshold complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
void
HAL_XSPI_SetUserData
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_user_data
)
¶
-
Store User Data pointer into the handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_user_data – Pointer to the user data.
-
-
const
void
*
HAL_XSPI_GetUserData
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Retrieve User Data pointer from the handle.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t .
- Returns :
-
Pointer to the user data.
-
hal_status_t
HAL_XSPI_SetTxDMA
(
hal_xspi_handle_t
*
hxspi
,
hal_dma_handle_t
*
p_dma_tx
)
¶
-
link/store Tx HAL DMA handle into the HAL XSPI handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_dma_tx – Pointer to a hal_dma_handle_t .
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – The DMA Tx handle has been successfully linked and stored in the XSPI handle.
-
-
hal_status_t
HAL_XSPI_SetRxDMA
(
hal_xspi_handle_t
*
hxspi
,
hal_dma_handle_t
*
p_dma_rx
)
¶
-
link/store Rx HAL DMA handle into the HAL XSPI handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_dma_rx – Pointer to a hal_dma_handle_t .
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – The DMA Rx handle has been successfully linked and stored in the XSPI handle.
-
-
void
HAL_XSPI_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
¶
- group XSPI_Exported_Functions_Group4
-
This subsection provides a set callback functions allowing to manage the data transfer from/to external memory
Functions
-
void
HAL_XSPI_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
-
Handle the XSPI interrupt request.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
void
HAL_XSPI_ErrorCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Error callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_AbortCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Abort completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_FifoThresholdCallback
(
hal_xspi_handle_t
*
hxspi
)
-
FIFO Threshold callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_CmdCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Command completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_RxCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Rx Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_TxCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Tx Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_RxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Rx Half Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_TxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Tx Half Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_StatusMatchCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Status Match callback.
- Parameters :
-
hxspi – XSPI handle.
-
hal_status_t
HAL_XSPI_RegisterErrorCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Error Callback to be used instead of the weak HAL_XSPI_ErrorCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the error callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterCmdCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI command complete Callback TO be used instead of the weak HAL_XSPI_CmdCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the command complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterRxCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Receive complete Callback TO be used instead of the weak HAL_XSPI_RxCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the receive complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterTxCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Transfer complete Callback TO be used instead of the weak HAL_XSPI_TxCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the transfer complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterRxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Receive Half complete Callback TO be used instead of the weak HAL_XSPI_RxHalfCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the half receive complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterTxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Transfer Half complete Callback TO be used instead of the weak HAL_XSPI_TxHalfCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the half transfer complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterStatusMatchCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Status Match Callback TO be used instead of the weak HAL_XSPI_StatusMatchCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the status match callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterAbortCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Abort complete Callback TO be used instead of the weak HAL_XSPI_AbortCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the abort complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterFifoThresholdCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Fifo Threshold Callback TO be used instead of the weak HAL_XSPI_FifoThresholdCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the fifo threshold complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
void
HAL_XSPI_SetUserData
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_user_data
)
-
Store User Data pointer into the handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_user_data – Pointer to the user data.
-
-
const
void
*
HAL_XSPI_GetUserData
(
const
hal_xspi_handle_t
*
hxspi
)
-
Retrieve User Data pointer from the handle.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t .
- Returns :
-
Pointer to the user data.
-
hal_status_t
HAL_XSPI_SetTxDMA
(
hal_xspi_handle_t
*
hxspi
,
hal_dma_handle_t
*
p_dma_tx
)
-
link/store Tx HAL DMA handle into the HAL XSPI handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_dma_tx – Pointer to a hal_dma_handle_t .
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – The DMA Tx handle has been successfully linked and stored in the XSPI handle.
-
-
hal_status_t
HAL_XSPI_SetRxDMA
(
hal_xspi_handle_t
*
hxspi
,
hal_dma_handle_t
*
p_dma_rx
)
-
link/store Rx HAL DMA handle into the HAL XSPI handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_dma_rx – Pointer to a hal_dma_handle_t .
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – The DMA Rx handle has been successfully linked and stored in the XSPI handle.
-
-
void
HAL_XSPI_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
- group XSPI_Exported_Functions_Group4
-
This subsection provides a set callback functions allowing to manage the data transfer from/to external memory
Functions
-
void
HAL_XSPI_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
-
Handle the XSPI interrupt request.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
void
HAL_XSPI_ErrorCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Error callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_AbortCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Abort completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_FifoThresholdCallback
(
hal_xspi_handle_t
*
hxspi
)
-
FIFO Threshold callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_CmdCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Command completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_RxCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Rx Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_TxCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Tx Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_RxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Rx Half Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_TxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Tx Half Transfer completed callback.
- Parameters :
-
hxspi – XSPI handle.
-
void
HAL_XSPI_StatusMatchCallback
(
hal_xspi_handle_t
*
hxspi
)
-
Status Match callback.
- Parameters :
-
hxspi – XSPI handle.
-
hal_status_t
HAL_XSPI_RegisterErrorCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Error Callback to be used instead of the weak HAL_XSPI_ErrorCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the error callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterCmdCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI command complete Callback TO be used instead of the weak HAL_XSPI_CmdCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the command complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterRxCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Receive complete Callback TO be used instead of the weak HAL_XSPI_RxCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the receive complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterTxCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Transfer complete Callback TO be used instead of the weak HAL_XSPI_TxCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the transfer complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterRxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Receive Half complete Callback TO be used instead of the weak HAL_XSPI_RxHalfCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the half receive complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterTxHalfCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Transfer Half complete Callback TO be used instead of the weak HAL_XSPI_TxHalfCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the half transfer complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterStatusMatchCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Status Match Callback TO be used instead of the weak HAL_XSPI_StatusMatchCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the status match callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterAbortCpltCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Abort complete Callback TO be used instead of the weak HAL_XSPI_AbortCpltCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the abort complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_status_t
HAL_XSPI_RegisterFifoThresholdCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI Fifo Threshold Callback TO be used instead of the weak HAL_XSPI_FifoThresholdCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the fifo threshold complete callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
void
HAL_XSPI_SetUserData
(
hal_xspi_handle_t
*
hxspi
,
const
void
*
p_user_data
)
-
Store User Data pointer into the handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_user_data – Pointer to the user data.
-
-
const
void
*
HAL_XSPI_GetUserData
(
const
hal_xspi_handle_t
*
hxspi
)
-
Retrieve User Data pointer from the handle.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t .
- Returns :
-
Pointer to the user data.
-
hal_status_t
HAL_XSPI_SetTxDMA
(
hal_xspi_handle_t
*
hxspi
,
hal_dma_handle_t
*
p_dma_tx
)
-
link/store Tx HAL DMA handle into the HAL XSPI handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_dma_tx – Pointer to a hal_dma_handle_t .
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – The DMA Tx handle has been successfully linked and stored in the XSPI handle.
-
-
hal_status_t
HAL_XSPI_SetRxDMA
(
hal_xspi_handle_t
*
hxspi
,
hal_dma_handle_t
*
p_dma_rx
)
-
link/store Rx HAL DMA handle into the HAL XSPI handle.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t .
-
p_dma_rx – Pointer to a hal_dma_handle_t .
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – The DMA Rx handle has been successfully linked and stored in the XSPI handle.
-
-
void
HAL_XSPI_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
Peripheral current frequency, state and errors functions ¶
- group XSPI_Exported_Functions_Group5
-
This subsection provides a set of functions allowing to read peripheral current frequency, state and last occurred errors.
Functions
-
uint32_t
HAL_XSPI_GetClockFreq
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Return the peripheral clock frequency for XSPI.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains the configuration information for XSPI module.
- Return values :
-
-
uint32_t – Frequency in Hz.
-
0 – source clock of the hxspi not configured or not ready.
-
-
hal_xspi_state_t
HAL_XSPI_GetState
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Retrieve the HAL XSPI Global State.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Returns :
-
Retrieve the XSPI global state.
-
uint32_t
HAL_XSPI_GetLastErrorCodes
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Return the XSPI error code.
- Parameters :
-
hxspi – XSPI handle
- Return values :
-
XSPI – error code
-
uint32_t
HAL_XSPI_GetClockFreq
(
const
hal_xspi_handle_t
*
hxspi
)
¶
- group XSPI_Exported_Functions_Group5
-
This subsection provides a set of functions allowing to read peripheral current frequency, state and last occurred errors.
Functions
-
uint32_t
HAL_XSPI_GetClockFreq
(
const
hal_xspi_handle_t
*
hxspi
)
-
Return the peripheral clock frequency for XSPI.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains the configuration information for XSPI module.
- Return values :
-
-
uint32_t – Frequency in Hz.
-
0 – source clock of the hxspi not configured or not ready.
-
-
hal_xspi_state_t
HAL_XSPI_GetState
(
const
hal_xspi_handle_t
*
hxspi
)
-
Retrieve the HAL XSPI Global State.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Returns :
-
Retrieve the XSPI global state.
-
uint32_t
HAL_XSPI_GetLastErrorCodes
(
const
hal_xspi_handle_t
*
hxspi
)
-
Return the XSPI error code.
- Parameters :
-
hxspi – XSPI handle
- Return values :
-
XSPI – error code
-
uint32_t
HAL_XSPI_GetClockFreq
(
const
hal_xspi_handle_t
*
hxspi
)
- group XSPI_Exported_Functions_Group5
-
This subsection provides a set of functions allowing to read peripheral current frequency, state and last occurred errors.
Functions
-
uint32_t
HAL_XSPI_GetClockFreq
(
const
hal_xspi_handle_t
*
hxspi
)
-
Return the peripheral clock frequency for XSPI.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains the configuration information for XSPI module.
- Return values :
-
-
uint32_t – Frequency in Hz.
-
0 – source clock of the hxspi not configured or not ready.
-
-
hal_xspi_state_t
HAL_XSPI_GetState
(
const
hal_xspi_handle_t
*
hxspi
)
-
Retrieve the HAL XSPI Global State.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Returns :
-
Retrieve the XSPI global state.
-
uint32_t
HAL_XSPI_GetLastErrorCodes
(
const
hal_xspi_handle_t
*
hxspi
)
-
Return the XSPI error code.
- Parameters :
-
hxspi – XSPI handle
- Return values :
-
XSPI – error code
-
uint32_t
HAL_XSPI_GetClockFreq
(
const
hal_xspi_handle_t
*
hxspi
)
XSPI Delay Block functions ¶
- group XSPI_Exported_Functions_Group6
-
This subsection provides a set of functions allowing to configure the Delay Block :
-
Call the function HAL_XSPI_DLYB_SetConfigDelay() to set the delay configuration of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_GetConfigDelay() to get the delay output clock phase of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_CalculateMaxClockPhase() to calculate the maximum output clock phase of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_Enable() to enable the delay block peripheral
-
Call the function HAL_XSPI_DLYB_Disable() to disable the delay block peripheral
-
Call the function HAL_XSPI_DLYB_IsEnabled() to check if the delay block peripheral is enabled or not
Functions
-
hal_status_t
HAL_XSPI_DLYB_SetConfigDelay
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
clock_phase_value
)
¶
-
Set the delay configuration of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
clock_phase_value – The desired output clock phase value.
-
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI.
-
HAL_OK – The delay is correctly configured.
-
-
hal_status_t
HAL_XSPI_DLYB_GetConfigDelay
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
*
p_clock_phase
)
¶
-
Get the delay output clock phase of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_clock_phase – Pointer to the variable where the selected output clock phase value will be stored.
-
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI.
-
HAL_OK – When the register reading was successful.
-
-
hal_status_t
HAL_XSPI_DLYB_CalculateMaxClockPhase
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
*
p_max_clock_phase
)
¶
-
Calculate maximum output clock phase of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_max_clock_phase – Pointer to the variable where the maximum clock phase value will be stored.
-
- Return values :
-
-
HAL_ERROR – The max clock phase is not correctly calculated.
-
HAL_INVALID_PARAM – When no valid XSPI or invalid p_max_clock_phase parameter.
-
HAL_OK – The max clock phase is correctly calculated.
-
-
hal_status_t
HAL_XSPI_DLYB_Enable
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Enable the delay block peripheral.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_ERROR – The delay is not correctly configured.
-
HAL_INVALID_PARAM – When no valid XSPI instance.
-
HAL_OK – The delay is correctly configured.
-
-
hal_status_t
HAL_XSPI_DLYB_Disable
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Disable the delay block peripheral.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI instance.
-
HAL_OK – The delay block is disabled.
-
-
hal_xspi_dlyb_status_t
HAL_XSPI_DLYB_IsEnabled
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Check if the delay block peripheral is enabled or not.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_XSPI_DLYB_ENABLED – The delay block is enabled.
-
HAL_XSPI_DLYB_DISABLED – The delay block is disabled.
-
-
- group XSPI_Exported_Functions_Group6
-
This subsection provides a set of functions allowing to configure the Delay Block :
-
Call the function HAL_XSPI_DLYB_SetConfigDelay() to set the delay configuration of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_GetConfigDelay() to get the delay output clock phase of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_CalculateMaxClockPhase() to calculate the maximum output clock phase of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_Enable() to enable the delay block peripheral
-
Call the function HAL_XSPI_DLYB_Disable() to disable the delay block peripheral
-
Call the function HAL_XSPI_DLYB_IsEnabled() to check if the delay block peripheral is enabled or not
Functions
-
hal_status_t
HAL_XSPI_DLYB_SetConfigDelay
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
clock_phase_value
)
-
Set the delay configuration of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
clock_phase_value – The desired output clock phase value.
-
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI.
-
HAL_OK – The delay is correctly configured.
-
-
hal_status_t
HAL_XSPI_DLYB_GetConfigDelay
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
*
p_clock_phase
)
-
Get the delay output clock phase of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_clock_phase – Pointer to the variable where the selected output clock phase value will be stored.
-
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI.
-
HAL_OK – When the register reading was successful.
-
-
hal_status_t
HAL_XSPI_DLYB_CalculateMaxClockPhase
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
*
p_max_clock_phase
)
-
Calculate maximum output clock phase of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_max_clock_phase – Pointer to the variable where the maximum clock phase value will be stored.
-
- Return values :
-
-
HAL_ERROR – The max clock phase is not correctly calculated.
-
HAL_INVALID_PARAM – When no valid XSPI or invalid p_max_clock_phase parameter.
-
HAL_OK – The max clock phase is correctly calculated.
-
-
hal_status_t
HAL_XSPI_DLYB_Enable
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the delay block peripheral.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_ERROR – The delay is not correctly configured.
-
HAL_INVALID_PARAM – When no valid XSPI instance.
-
HAL_OK – The delay is correctly configured.
-
-
hal_status_t
HAL_XSPI_DLYB_Disable
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the delay block peripheral.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI instance.
-
HAL_OK – The delay block is disabled.
-
-
hal_xspi_dlyb_status_t
HAL_XSPI_DLYB_IsEnabled
(
const
hal_xspi_handle_t
*
hxspi
)
-
Check if the delay block peripheral is enabled or not.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_XSPI_DLYB_ENABLED – The delay block is enabled.
-
HAL_XSPI_DLYB_DISABLED – The delay block is disabled.
-
-
- group XSPI_Exported_Functions_Group6
-
This subsection provides a set of functions allowing to configure the Delay Block :
-
Call the function HAL_XSPI_DLYB_SetConfigDelay() to set the delay configuration of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_GetConfigDelay() to get the delay output clock phase of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_CalculateMaxClockPhase() to calculate the maximum output clock phase of the delay block peripheral
-
Call the function HAL_XSPI_DLYB_Enable() to enable the delay block peripheral
-
Call the function HAL_XSPI_DLYB_Disable() to disable the delay block peripheral
-
Call the function HAL_XSPI_DLYB_IsEnabled() to check if the delay block peripheral is enabled or not
Functions
-
hal_status_t
HAL_XSPI_DLYB_SetConfigDelay
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
clock_phase_value
)
-
Set the delay configuration of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
clock_phase_value – The desired output clock phase value.
-
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI.
-
HAL_OK – The delay is correctly configured.
-
-
hal_status_t
HAL_XSPI_DLYB_GetConfigDelay
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
*
p_clock_phase
)
-
Get the delay output clock phase of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_clock_phase – Pointer to the variable where the selected output clock phase value will be stored.
-
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI.
-
HAL_OK – When the register reading was successful.
-
-
hal_status_t
HAL_XSPI_DLYB_CalculateMaxClockPhase
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
*
p_max_clock_phase
)
-
Calculate maximum output clock phase of the delay block peripheral.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_max_clock_phase – Pointer to the variable where the maximum clock phase value will be stored.
-
- Return values :
-
-
HAL_ERROR – The max clock phase is not correctly calculated.
-
HAL_INVALID_PARAM – When no valid XSPI or invalid p_max_clock_phase parameter.
-
HAL_OK – The max clock phase is correctly calculated.
-
-
hal_status_t
HAL_XSPI_DLYB_Enable
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the delay block peripheral.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_ERROR – The delay is not correctly configured.
-
HAL_INVALID_PARAM – When no valid XSPI instance.
-
HAL_OK – The delay is correctly configured.
-
-
hal_status_t
HAL_XSPI_DLYB_Disable
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the delay block peripheral.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_INVALID_PARAM – When no valid XSPI instance.
-
HAL_OK – The delay block is disabled.
-
-
hal_xspi_dlyb_status_t
HAL_XSPI_DLYB_IsEnabled
(
const
hal_xspi_handle_t
*
hxspi
)
-
Check if the delay block peripheral is enabled or not.
- Parameters :
-
hxspi – Pointer to XSPI handle.
- Return values :
-
-
HAL_XSPI_DLYB_ENABLED – The delay block is enabled.
-
HAL_XSPI_DLYB_DISABLED – The delay block is disabled.
-
-
XSPI high-speed interface and calibration functions ¶
- group XSPI_Exported_Functions_Group7
-
This subsection provides a set of functions allowing to configure the high-speed interface and calibration :
-
Call the function HAL_XSPI_HSIC_SetConfigDelay() to set a delay value for the high-speed interface DLLs
-
Call the function HAL_XSPI_HSIC_GetConfigDelay() to get the delay values of the high-speed interface DLLs of the selected XSPIx peripheral
Functions
-
hal_status_t
HAL_XSPI_HSIC_SetConfigDelay
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_hsic_config_t
*
p_config
)
¶
-
Set a delay value for the high-speed interface DLLs.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_config – Configuration of delay value specified in DelayValueType field.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK. –
-
-
hal_status_t
HAL_XSPI_HSIC_GetConfigDelay
(
const
hal_xspi_handle_t
*
hxspi
,
hal_xspi_hsic_config_t
*
p_config
)
¶
-
Get the delay values of the high-speed interface DLLs.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_config – Current delay values corresponding to the DelayValueType field.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK. –
-
-
- group XSPI_Exported_Functions_Group7
-
This subsection provides a set of functions allowing to configure the high-speed interface and calibration :
-
Call the function HAL_XSPI_HSIC_SetConfigDelay() to set a delay value for the high-speed interface DLLs
-
Call the function HAL_XSPI_HSIC_GetConfigDelay() to get the delay values of the high-speed interface DLLs of the selected XSPIx peripheral
Functions
-
hal_status_t
HAL_XSPI_HSIC_SetConfigDelay
(
hal_xspi_handle_t
*
hxspi
,
const
hal_xspi_hsic_config_t
*
p_config
)
-
Set a delay value for the high-speed interface DLLs.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_config – Configuration of delay value specified in DelayValueType field.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK. –
-
-
hal_status_t
HAL_XSPI_HSIC_GetConfigDelay
(
const
hal_xspi_handle_t
*
hxspi
,
hal_xspi_hsic_config_t
*
p_config
)
-
Get the delay values of the high-speed interface DLLs.
- Parameters :
-
-
hxspi – Pointer to XSPI handle.
-
p_config – Current delay values corresponding to the DelayValueType field.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK. –
-
-
XSPI high-speed interface and calibration functions ¶
- group XSPI_Exported_Functions_Group8
-
This subsection provides a set of functions allowing to configure the XSPIM IO Manager :
-
IO manager (XSPIM) configuration APIs:
-
HAL_XSPI_XSPIM_SetConfig() Allowing to configure a XSPIM according to the user parameters
-
HAL_XSPI_XSPIM_GetConfig() Allowing to retrieve a XSPIM configuration
-
Functions
-
hal_status_t
HAL_XSPI_XSPIM_SetConfig
(
const
hal_xspi_xspim_config_t
*
p_config
)
¶
-
Configure the XSPIM according to the user parameters.
Note
XSPIM XSPI I/O Manager Instance.
- Parameters :
-
p_config – Pointer to the hal_xspi_xspim_config_t structure.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_ERROR – XSPI instance is enabled.
-
HAL_OK – XSPIM instance has been correctly configured.
-
-
void
HAL_XSPI_XSPIM_GetConfig
(
hal_xspi_xspim_config_t
*
p_config
)
¶
-
Get the current IOM configuration from XSPIM.
- Parameters :
-
p_config – Pointer to the hal_xspi_xspim_config_t structure.
-
- group XSPI_Exported_Functions_Group8
-
This subsection provides a set of functions allowing to configure the XSPIM IO Manager :
-
IO manager (XSPIM) configuration APIs:
-
HAL_XSPI_XSPIM_SetConfig() Allowing to configure a XSPIM according to the user parameters
-
HAL_XSPI_XSPIM_GetConfig() Allowing to retrieve a XSPIM configuration
-
Functions
-
hal_status_t
HAL_XSPI_XSPIM_SetConfig
(
const
hal_xspi_xspim_config_t
*
p_config
)
-
Configure the XSPIM according to the user parameters.
Note
XSPIM XSPI I/O Manager Instance.
- Parameters :
-
p_config – Pointer to the hal_xspi_xspim_config_t structure.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_ERROR – XSPI instance is enabled.
-
HAL_OK – XSPIM instance has been correctly configured.
-
-
void
HAL_XSPI_XSPIM_GetConfig
(
hal_xspi_xspim_config_t
*
p_config
)
-
Get the current IOM configuration from XSPIM.
- Parameters :
-
p_config – Pointer to the hal_xspi_xspim_config_t structure.
-
XSPI OTFDEC functions ¶
- group XSPI_Exported_Functions_Group10
-
This subsection provides a set of functions allowing to configure the OTFDEC :
-
Call the function HAL_XSPI_OTFDEC_SetConfigRegion() to configure the OTFDEC region according to the user parameters.
-
Call the function HAL_XSPI_OTFDEC_GetConfigRegion() to get the OTFDEC region configuration.
-
Call the function HAL_XSPI_OTFDEC_StartRegionDecryption() to start the decryption of the OTFDEC region.
-
Call the function HAL_XSPI_OTFDEC_StopRegionDecryption() to stop the decryption of the OTFDEC region.
-
Call the function HAL_XSPI_OTFDEC_Encrypt() to encrypt data in a dedicated region.
-
Call the function HAL_XSPI_OTFDEC_GetRegionKeyCRC() to get region key CRC.
-
Call the function HAL_XSPI_OTFDEC_EnablePrivAccess() to enable privilege access.
-
Call the function HAL_XSPI_OTFDEC_DisablePrivAccess() to disable privilege access.
-
Call the function HAL_XSPI_OTFDEC_IsEnabledPrivAccess() to check if privilege access is enabled or not.
-
Call the function HAL_XSPI_OTFDEC_LockRegionConfig() to lock region configuration.
-
Call the function HAL_XSPI_OTFDEC_IsLockedRegionConfig() to check if region configuration is locked or not.
-
Call the function HAL_XSPI_OTFDEC_LockRegionKey() to lock region key.
-
Call the function HAL_XSPI_OTFDEC_IsLockedRegionKey() to check if region key is locked or not.
Functions
-
hal_status_t
HAL_XSPI_OTFDEC_SetConfigRegion
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
const
hal_xspi_otfdec_config_t
*
p_config
,
const
hal_xspi_otfdec_key_t
*
p_key_config
)
¶
-
Configure the OTFDEC region.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_config – Pointer to the hal_xspi_otfdec_config_t structure.
-
p_key_config – Pointer to the hal_xspi_otfdec_key_t.
-
- Return values :
-
-
HAL_ERROR – OTFDEC region key is not correctly generated.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC region has been correctly configured.
-
-
void
HAL_XSPI_OTFDEC_GetConfigRegion
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
hal_xspi_otfdec_config_t
*
p_config
)
¶
-
Get the OTFDEC region configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_config – Pointer to the hal_xspi_config_t structure.
-
-
hal_status_t
HAL_XSPI_OTFDEC_StartRegionDecryption
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint32_t
interrupts
)
¶
-
Start the OTFDEC region decryption.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – region index, can be a value of hal_xspi_otfdec_region_t.
-
interrupts – Specifies the OTFDEC interrupt sources to be enabled. This parameter can be a combination of OTFDEC interrupts group.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC region has been correctly enabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_StopRegionDecryption
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
¶
-
Stop the OTFDEC region decryption.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when the XSPI handle is NULL.
-
HAL_OK – OTFDEC region has been correctly disabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_Encrypt
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint32_t
*
p_input
,
uint32_t
*
p_output
,
uint32_t
size_byte
,
uint32_t
start_address
,
uint32_t
interrupts
)
¶
-
Encrypt the OTFDEC region.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_input – Pointer to plain data.
-
p_output – Pointer to ciphered data.
-
size_byte – Plain data size in byte.
-
start_address – Starting address in the external memory area where the enciphered data will be eventually stored.
-
interrupts – Specifies the OTFDEC interrupt sources to be enabled. This parameter can be a combination of OTFDEC interrupts group.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when one of the provided inputs is NULL.
-
HAL_OK – OTFDEC region has been correctly encrypted.
-
-
hal_status_t
HAL_XSPI_OTFDEC_GetRegionKeyCRC
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint8_t
*
p_key_crc
)
¶
-
Get the region key crc.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_key_crc – Pointer to be filled with crc key.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when one of the provided inputs is NULL.
-
HAL_OK – OTFDEC region key crc has been returned correctly.
-
-
hal_status_t
HAL_XSPI_OTFDEC_EnablePrivAccess
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Enable the privilege access protection.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Privilege access protection has been correctly enabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_DisablePrivAccess
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Disable the privilege access protection.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Privilege access protection has been correctly disabled.
-
-
hal_xspi_otfdec_privilege_attr_t
HAL_XSPI_OTFDEC_IsEnabledPrivAccess
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Check whether the otfdec privilege access protection is enabled or not.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_XSPI_OTFDEC_ATTRIBUTE_NON_PRIVILEGED – OTFDEC is accessed .in non privileged mode.
-
HAL_XSPI_OTFDEC_ATTRIBUTE_PRIVILEGED – OTFDEC is accessed only in privileged mode.
-
-
hal_status_t
HAL_XSPI_OTFDEC_LockRegionConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
¶
-
Lock the OTFDEC region configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Region configuration has been correctly locked.
-
-
hal_xspi_otfdec_lock_config_status_t
HAL_XSPI_OTFDEC_IsLockedRegionConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
¶
-
Check whether the OTFDEC region configuration is locked or not.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_LOCK_CONFIG_ENABLED – OTFDEC region configuration is locked.
-
HAL_XSPI_OTFDEC_LOCK_CONFIG_DISABLED – OTFDEC region configuration is not locked.
-
-
hal_status_t
HAL_XSPI_OTFDEC_LockRegionKey
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
¶
-
Enable the OTFDEC region key lock.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Region Key lock has been correctly locked.
-
-
hal_xspi_otfdec_lock_key_status_t
HAL_XSPI_OTFDEC_IsLockedRegionKey
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
¶
-
Check whether the region key is locked or not.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_LOCK_KEY_ENABLED – OTFDEC region key is locked.
-
HAL_XSPI_OTFDEC_LOCK_KEY_DISABLED – OTFDEC region key is not locked.
-
-
void
HAL_XSPI_OTFDEC_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
¶
-
Handle the OTFDEC interrupt request.
- Parameters :
-
hxspi – Pointer to hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
void
HAL_XSPI_OTFDEC_ErrorCallback
(
hal_xspi_handle_t
*
hxspi
)
¶
-
OTFDEC Error callback.
- Parameters :
-
hxspi – Pointer to hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
hal_status_t
HAL_XSPI_OTFDEC_RegisterErrorCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
¶
-
Register the XSPI OTFDEC Error Callback to be used instead of the weak HAL_XSPI_OTFDEC_ErrorCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the error callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_xspi_otfdec_region_state_t
HAL_XSPI_OTFDEC_GetRegionState
(
const
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
¶
-
Return the XSPI OTFDEC region state.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_REGION_STATE_RESET – OTFDEC region is not yet configured.
-
HAL_XSPI_OTFDEC_REGION_STATE_CONFIGURED – OTFDEC region is configured.
-
HAL_XSPI_OTFDEC_REGION_STATE_DECRYPT – OTFDEC region is decryption is ongoing.
-
-
uint32_t
HAL_XSPI_OTFDEC_GetLastErrorCodes
(
const
hal_xspi_handle_t
*
hxspi
)
¶
-
Return the XSPI OTFDEC error code.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
uint32_t – Last error codes which can be a combination of OTFDEC Error Code definition reflecting the processes asynchronous errors
-
- group XSPI_Exported_Functions_Group10
-
This subsection provides a set of functions allowing to configure the OTFDEC :
-
Call the function HAL_XSPI_OTFDEC_SetConfigRegion() to configure the OTFDEC region according to the user parameters.
-
Call the function HAL_XSPI_OTFDEC_GetConfigRegion() to get the OTFDEC region configuration.
-
Call the function HAL_XSPI_OTFDEC_StartRegionDecryption() to start the decryption of the OTFDEC region.
-
Call the function HAL_XSPI_OTFDEC_StopRegionDecryption() to stop the decryption of the OTFDEC region.
-
Call the function HAL_XSPI_OTFDEC_Encrypt() to encrypt data in a dedicated region.
-
Call the function HAL_XSPI_OTFDEC_GetRegionKeyCRC() to get region key CRC.
-
Call the function HAL_XSPI_OTFDEC_EnablePrivAccess() to enable privilege access.
-
Call the function HAL_XSPI_OTFDEC_DisablePrivAccess() to disable privilege access.
-
Call the function HAL_XSPI_OTFDEC_IsEnabledPrivAccess() to check if privilege access is enabled or not.
-
Call the function HAL_XSPI_OTFDEC_LockRegionConfig() to lock region configuration.
-
Call the function HAL_XSPI_OTFDEC_IsLockedRegionConfig() to check if region configuration is locked or not.
-
Call the function HAL_XSPI_OTFDEC_LockRegionKey() to lock region key.
-
Call the function HAL_XSPI_OTFDEC_IsLockedRegionKey() to check if region key is locked or not.
Functions
-
hal_status_t
HAL_XSPI_OTFDEC_SetConfigRegion
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
const
hal_xspi_otfdec_config_t
*
p_config
,
const
hal_xspi_otfdec_key_t
*
p_key_config
)
-
Configure the OTFDEC region.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_config – Pointer to the hal_xspi_otfdec_config_t structure.
-
p_key_config – Pointer to the hal_xspi_otfdec_key_t.
-
- Return values :
-
-
HAL_ERROR – OTFDEC region key is not correctly generated.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC region has been correctly configured.
-
-
void
HAL_XSPI_OTFDEC_GetConfigRegion
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
hal_xspi_otfdec_config_t
*
p_config
)
-
Get the OTFDEC region configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_config – Pointer to the hal_xspi_config_t structure.
-
-
hal_status_t
HAL_XSPI_OTFDEC_StartRegionDecryption
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint32_t
interrupts
)
-
Start the OTFDEC region decryption.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – region index, can be a value of hal_xspi_otfdec_region_t.
-
interrupts – Specifies the OTFDEC interrupt sources to be enabled. This parameter can be a combination of OTFDEC interrupts group.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC region has been correctly enabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_StopRegionDecryption
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Stop the OTFDEC region decryption.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when the XSPI handle is NULL.
-
HAL_OK – OTFDEC region has been correctly disabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_Encrypt
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint32_t
*
p_input
,
uint32_t
*
p_output
,
uint32_t
size_byte
,
uint32_t
start_address
,
uint32_t
interrupts
)
-
Encrypt the OTFDEC region.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_input – Pointer to plain data.
-
p_output – Pointer to ciphered data.
-
size_byte – Plain data size in byte.
-
start_address – Starting address in the external memory area where the enciphered data will be eventually stored.
-
interrupts – Specifies the OTFDEC interrupt sources to be enabled. This parameter can be a combination of OTFDEC interrupts group.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when one of the provided inputs is NULL.
-
HAL_OK – OTFDEC region has been correctly encrypted.
-
-
hal_status_t
HAL_XSPI_OTFDEC_GetRegionKeyCRC
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint8_t
*
p_key_crc
)
-
Get the region key crc.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_key_crc – Pointer to be filled with crc key.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when one of the provided inputs is NULL.
-
HAL_OK – OTFDEC region key crc has been returned correctly.
-
-
hal_status_t
HAL_XSPI_OTFDEC_EnablePrivAccess
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the privilege access protection.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Privilege access protection has been correctly enabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_DisablePrivAccess
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the privilege access protection.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Privilege access protection has been correctly disabled.
-
-
hal_xspi_otfdec_privilege_attr_t
HAL_XSPI_OTFDEC_IsEnabledPrivAccess
(
hal_xspi_handle_t
*
hxspi
)
-
Check whether the otfdec privilege access protection is enabled or not.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_XSPI_OTFDEC_ATTRIBUTE_NON_PRIVILEGED – OTFDEC is accessed .in non privileged mode.
-
HAL_XSPI_OTFDEC_ATTRIBUTE_PRIVILEGED – OTFDEC is accessed only in privileged mode.
-
-
hal_status_t
HAL_XSPI_OTFDEC_LockRegionConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Lock the OTFDEC region configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Region configuration has been correctly locked.
-
-
hal_xspi_otfdec_lock_config_status_t
HAL_XSPI_OTFDEC_IsLockedRegionConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Check whether the OTFDEC region configuration is locked or not.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_LOCK_CONFIG_ENABLED – OTFDEC region configuration is locked.
-
HAL_XSPI_OTFDEC_LOCK_CONFIG_DISABLED – OTFDEC region configuration is not locked.
-
-
hal_status_t
HAL_XSPI_OTFDEC_LockRegionKey
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Enable the OTFDEC region key lock.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Region Key lock has been correctly locked.
-
-
hal_xspi_otfdec_lock_key_status_t
HAL_XSPI_OTFDEC_IsLockedRegionKey
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Check whether the region key is locked or not.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_LOCK_KEY_ENABLED – OTFDEC region key is locked.
-
HAL_XSPI_OTFDEC_LOCK_KEY_DISABLED – OTFDEC region key is not locked.
-
-
void
HAL_XSPI_OTFDEC_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
-
Handle the OTFDEC interrupt request.
- Parameters :
-
hxspi – Pointer to hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
void
HAL_XSPI_OTFDEC_ErrorCallback
(
hal_xspi_handle_t
*
hxspi
)
-
OTFDEC Error callback.
- Parameters :
-
hxspi – Pointer to hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
hal_status_t
HAL_XSPI_OTFDEC_RegisterErrorCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI OTFDEC Error Callback to be used instead of the weak HAL_XSPI_OTFDEC_ErrorCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the error callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_xspi_otfdec_region_state_t
HAL_XSPI_OTFDEC_GetRegionState
(
const
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Return the XSPI OTFDEC region state.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_REGION_STATE_RESET – OTFDEC region is not yet configured.
-
HAL_XSPI_OTFDEC_REGION_STATE_CONFIGURED – OTFDEC region is configured.
-
HAL_XSPI_OTFDEC_REGION_STATE_DECRYPT – OTFDEC region is decryption is ongoing.
-
-
uint32_t
HAL_XSPI_OTFDEC_GetLastErrorCodes
(
const
hal_xspi_handle_t
*
hxspi
)
-
Return the XSPI OTFDEC error code.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
uint32_t – Last error codes which can be a combination of OTFDEC Error Code definition reflecting the processes asynchronous errors
-
- group XSPI_Exported_Functions_Group10
-
This subsection provides a set of functions allowing to configure the OTFDEC :
-
Call the function HAL_XSPI_OTFDEC_SetConfigRegion() to configure the OTFDEC region according to the user parameters.
-
Call the function HAL_XSPI_OTFDEC_GetConfigRegion() to get the OTFDEC region configuration.
-
Call the function HAL_XSPI_OTFDEC_StartRegionDecryption() to start the decryption of the OTFDEC region.
-
Call the function HAL_XSPI_OTFDEC_StopRegionDecryption() to stop the decryption of the OTFDEC region.
-
Call the function HAL_XSPI_OTFDEC_Encrypt() to encrypt data in a dedicated region.
-
Call the function HAL_XSPI_OTFDEC_GetRegionKeyCRC() to get region key CRC.
-
Call the function HAL_XSPI_OTFDEC_EnablePrivAccess() to enable privilege access.
-
Call the function HAL_XSPI_OTFDEC_DisablePrivAccess() to disable privilege access.
-
Call the function HAL_XSPI_OTFDEC_IsEnabledPrivAccess() to check if privilege access is enabled or not.
-
Call the function HAL_XSPI_OTFDEC_LockRegionConfig() to lock region configuration.
-
Call the function HAL_XSPI_OTFDEC_IsLockedRegionConfig() to check if region configuration is locked or not.
-
Call the function HAL_XSPI_OTFDEC_LockRegionKey() to lock region key.
-
Call the function HAL_XSPI_OTFDEC_IsLockedRegionKey() to check if region key is locked or not.
Functions
-
hal_status_t
HAL_XSPI_OTFDEC_SetConfigRegion
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
const
hal_xspi_otfdec_config_t
*
p_config
,
const
hal_xspi_otfdec_key_t
*
p_key_config
)
-
Configure the OTFDEC region.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_config – Pointer to the hal_xspi_otfdec_config_t structure.
-
p_key_config – Pointer to the hal_xspi_otfdec_key_t.
-
- Return values :
-
-
HAL_ERROR – OTFDEC region key is not correctly generated.
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC region has been correctly configured.
-
-
void
HAL_XSPI_OTFDEC_GetConfigRegion
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
hal_xspi_otfdec_config_t
*
p_config
)
-
Get the OTFDEC region configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_config – Pointer to the hal_xspi_config_t structure.
-
-
hal_status_t
HAL_XSPI_OTFDEC_StartRegionDecryption
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint32_t
interrupts
)
-
Start the OTFDEC region decryption.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – region index, can be a value of hal_xspi_otfdec_region_t.
-
interrupts – Specifies the OTFDEC interrupt sources to be enabled. This parameter can be a combination of OTFDEC interrupts group.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC region has been correctly enabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_StopRegionDecryption
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Stop the OTFDEC region decryption.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when the XSPI handle is NULL.
-
HAL_OK – OTFDEC region has been correctly disabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_Encrypt
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint32_t
*
p_input
,
uint32_t
*
p_output
,
uint32_t
size_byte
,
uint32_t
start_address
,
uint32_t
interrupts
)
-
Encrypt the OTFDEC region.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_input – Pointer to plain data.
-
p_output – Pointer to ciphered data.
-
size_byte – Plain data size in byte.
-
start_address – Starting address in the external memory area where the enciphered data will be eventually stored.
-
interrupts – Specifies the OTFDEC interrupt sources to be enabled. This parameter can be a combination of OTFDEC interrupts group.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when one of the provided inputs is NULL.
-
HAL_OK – OTFDEC region has been correctly encrypted.
-
-
hal_status_t
HAL_XSPI_OTFDEC_GetRegionKeyCRC
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
,
uint8_t
*
p_key_crc
)
-
Get the region key crc.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
p_key_crc – Pointer to be filled with crc key.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid param return when one of the provided inputs is NULL.
-
HAL_OK – OTFDEC region key crc has been returned correctly.
-
-
hal_status_t
HAL_XSPI_OTFDEC_EnablePrivAccess
(
hal_xspi_handle_t
*
hxspi
)
-
Enable the privilege access protection.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Privilege access protection has been correctly enabled.
-
-
hal_status_t
HAL_XSPI_OTFDEC_DisablePrivAccess
(
hal_xspi_handle_t
*
hxspi
)
-
Disable the privilege access protection.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Privilege access protection has been correctly disabled.
-
-
hal_xspi_otfdec_privilege_attr_t
HAL_XSPI_OTFDEC_IsEnabledPrivAccess
(
hal_xspi_handle_t
*
hxspi
)
-
Check whether the otfdec privilege access protection is enabled or not.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
-
HAL_XSPI_OTFDEC_ATTRIBUTE_NON_PRIVILEGED – OTFDEC is accessed .in non privileged mode.
-
HAL_XSPI_OTFDEC_ATTRIBUTE_PRIVILEGED – OTFDEC is accessed only in privileged mode.
-
-
hal_status_t
HAL_XSPI_OTFDEC_LockRegionConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Lock the OTFDEC region configuration.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – OTFDEC Region configuration has been correctly locked.
-
-
hal_xspi_otfdec_lock_config_status_t
HAL_XSPI_OTFDEC_IsLockedRegionConfig
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Check whether the OTFDEC region configuration is locked or not.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_LOCK_CONFIG_ENABLED – OTFDEC region configuration is locked.
-
HAL_XSPI_OTFDEC_LOCK_CONFIG_DISABLED – OTFDEC region configuration is not locked.
-
-
hal_status_t
HAL_XSPI_OTFDEC_LockRegionKey
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Enable the OTFDEC region key lock.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Region Key lock has been correctly locked.
-
-
hal_xspi_otfdec_lock_key_status_t
HAL_XSPI_OTFDEC_IsLockedRegionKey
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Check whether the region key is locked or not.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Region index, can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_LOCK_KEY_ENABLED – OTFDEC region key is locked.
-
HAL_XSPI_OTFDEC_LOCK_KEY_DISABLED – OTFDEC region key is not locked.
-
-
void
HAL_XSPI_OTFDEC_IRQHandler
(
hal_xspi_handle_t
*
hxspi
)
-
Handle the OTFDEC interrupt request.
- Parameters :
-
hxspi – Pointer to hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
void
HAL_XSPI_OTFDEC_ErrorCallback
(
hal_xspi_handle_t
*
hxspi
)
-
OTFDEC Error callback.
- Parameters :
-
hxspi – Pointer to hal_xspi_handle_t structure that contains the handle information for the specified XSPI instance.
-
hal_status_t
HAL_XSPI_OTFDEC_RegisterErrorCallback
(
hal_xspi_handle_t
*
hxspi
,
hal_xspi_cb_t
callback
)
-
Register the XSPI OTFDEC Error Callback to be used instead of the weak HAL_XSPI_OTFDEC_ErrorCallback() predefined callback.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
callback – Specifies the error callback.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter.
-
HAL_OK – Register completed successfully.
-
-
hal_xspi_otfdec_region_state_t
HAL_XSPI_OTFDEC_GetRegionState
(
const
hal_xspi_handle_t
*
hxspi
,
hal_xspi_otfdec_region_t
region
)
-
Return the XSPI OTFDEC region state.
- Parameters :
-
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
-
region – Can be a value of hal_xspi_otfdec_region_t.
-
- Return values :
-
-
HAL_XSPI_OTFDEC_REGION_STATE_RESET – OTFDEC region is not yet configured.
-
HAL_XSPI_OTFDEC_REGION_STATE_CONFIGURED – OTFDEC region is configured.
-
HAL_XSPI_OTFDEC_REGION_STATE_DECRYPT – OTFDEC region is decryption is ongoing.
-
-
uint32_t
HAL_XSPI_OTFDEC_GetLastErrorCodes
(
const
hal_xspi_handle_t
*
hxspi
)
-
Return the XSPI OTFDEC error code.
- Parameters :
-
hxspi – Pointer to a hal_xspi_handle_t structure that contains handle information for the specified XSPI instance.
- Return values :
-
uint32_t – Last error codes which can be a combination of OTFDEC Error Code definition reflecting the processes asynchronous errors
-
Interrupt functions ¶
- group XSPI_Exported_Functions_Group9
-
Functions
-
void
HAL_XSPI_EnableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
¶
-
Enable the specified XSPI interrupt.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to enable This parameter can be any combination of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
HAL_XSPI_IT_ALL: XSPI All interrupts
-
-
-
void
HAL_XSPI_DisableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
¶
-
Disable the specified XSPI interrupt.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to disable This parameter can be any combination of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
HAL_XSPI_IT_ALL: XSPI All interrupts
-
-
-
uint32_t
HAL_XSPI_IsEnabledIT
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
¶
-
Check whether the specified XSPI interrupt source is enabled or not.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to check This parameter can be one of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
-
- Returns :
-
retrieve the state of the selected XSPI interrupt.
-
hal_xspi_flag_status_t
HAL_XSPI_IsActiveFlag
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
flag
)
¶
-
Check whether the selected XSPI flag is set or not.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
flag – specifies the XSPI flag to check This parameter can be one of the following values:
-
HAL_XSPI_FLAG_BUSY: XSPI Busy flag
-
HAL_XSPI_FLAG_TO: XSPI Timeout flag
-
HAL_XSPI_FLAG_SM: XSPI Status match flag
-
HAL_XSPI_FLAG_FT: XSPI FIFO threshold flag
-
HAL_XSPI_FLAG_TC: XSPI Transfer complete flag
-
HAL_XSPI_FLAG_TE: XSPI Transfer error flag
-
-
- Returns :
-
retrieve the state of the selected XSPI flag.
-
void
HAL_XSPI_ClearFlag
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
flag
)
¶
-
Clears the specified XSPI’s flag status.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
flag – specifies the XSPI clear register flag that needs to be set This parameter can be any combination of the following values:
-
HAL_XSPI_FLAG_TO: XSPI Timeout flag
-
HAL_XSPI_FLAG_SM: XSPI Status match flag
-
HAL_XSPI_FLAG_TC: XSPI Transfer complete flag
-
HAL_XSPI_FLAG_TE: XSPI Transfer error flag
-
HAL_XSPI_FLAG_ALL: XSPI All flags
-
-
-
void
HAL_XSPI_EnableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
¶
- group XSPI_Exported_Functions_Group9
-
Functions
-
void
HAL_XSPI_EnableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
-
Enable the specified XSPI interrupt.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to enable This parameter can be any combination of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
HAL_XSPI_IT_ALL: XSPI All interrupts
-
-
-
void
HAL_XSPI_DisableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
-
Disable the specified XSPI interrupt.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to disable This parameter can be any combination of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
HAL_XSPI_IT_ALL: XSPI All interrupts
-
-
-
uint32_t
HAL_XSPI_IsEnabledIT
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
-
Check whether the specified XSPI interrupt source is enabled or not.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to check This parameter can be one of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
-
- Returns :
-
retrieve the state of the selected XSPI interrupt.
-
hal_xspi_flag_status_t
HAL_XSPI_IsActiveFlag
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
flag
)
-
Check whether the selected XSPI flag is set or not.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
flag – specifies the XSPI flag to check This parameter can be one of the following values:
-
HAL_XSPI_FLAG_BUSY: XSPI Busy flag
-
HAL_XSPI_FLAG_TO: XSPI Timeout flag
-
HAL_XSPI_FLAG_SM: XSPI Status match flag
-
HAL_XSPI_FLAG_FT: XSPI FIFO threshold flag
-
HAL_XSPI_FLAG_TC: XSPI Transfer complete flag
-
HAL_XSPI_FLAG_TE: XSPI Transfer error flag
-
-
- Returns :
-
retrieve the state of the selected XSPI flag.
-
void
HAL_XSPI_ClearFlag
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
flag
)
-
Clears the specified XSPI’s flag status.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
flag – specifies the XSPI clear register flag that needs to be set This parameter can be any combination of the following values:
-
HAL_XSPI_FLAG_TO: XSPI Timeout flag
-
HAL_XSPI_FLAG_SM: XSPI Status match flag
-
HAL_XSPI_FLAG_TC: XSPI Transfer complete flag
-
HAL_XSPI_FLAG_TE: XSPI Transfer error flag
-
HAL_XSPI_FLAG_ALL: XSPI All flags
-
-
-
void
HAL_XSPI_EnableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
- group XSPI_Exported_Functions_Group9
-
Functions
-
void
HAL_XSPI_EnableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
-
Enable the specified XSPI interrupt.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to enable This parameter can be any combination of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
HAL_XSPI_IT_ALL: XSPI All interrupts
-
-
-
void
HAL_XSPI_DisableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
-
Disable the specified XSPI interrupt.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to disable This parameter can be any combination of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
HAL_XSPI_IT_ALL: XSPI All interrupts
-
-
-
uint32_t
HAL_XSPI_IsEnabledIT
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)
-
Check whether the specified XSPI interrupt source is enabled or not.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
it_source – specifies the XSPI interrupt source to check This parameter can be one of the following values:
-
HAL_XSPI_IT_TO: XSPI Timeout interrupt
-
HAL_XSPI_IT_SM: XSPI Status match interrupt
-
HAL_XSPI_IT_FT: XSPI FIFO threshold interrupt
-
HAL_XSPI_IT_TC: XSPI Transfer complete interrupt
-
HAL_XSPI_IT_TE: XSPI Transfer error interrupt
-
-
- Returns :
-
retrieve the state of the selected XSPI interrupt.
-
hal_xspi_flag_status_t
HAL_XSPI_IsActiveFlag
(
const
hal_xspi_handle_t
*
hxspi
,
uint32_t
flag
)
-
Check whether the selected XSPI flag is set or not.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
flag – specifies the XSPI flag to check This parameter can be one of the following values:
-
HAL_XSPI_FLAG_BUSY: XSPI Busy flag
-
HAL_XSPI_FLAG_TO: XSPI Timeout flag
-
HAL_XSPI_FLAG_SM: XSPI Status match flag
-
HAL_XSPI_FLAG_FT: XSPI FIFO threshold flag
-
HAL_XSPI_FLAG_TC: XSPI Transfer complete flag
-
HAL_XSPI_FLAG_TE: XSPI Transfer error flag
-
-
- Returns :
-
retrieve the state of the selected XSPI flag.
-
void
HAL_XSPI_ClearFlag
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
flag
)
-
Clears the specified XSPI’s flag status.
- Parameters :
-
-
hxspi – specifies the XSPI Handle.
-
flag – specifies the XSPI clear register flag that needs to be set This parameter can be any combination of the following values:
-
HAL_XSPI_FLAG_TO: XSPI Timeout flag
-
HAL_XSPI_FLAG_SM: XSPI Status match flag
-
HAL_XSPI_FLAG_TC: XSPI Transfer complete flag
-
HAL_XSPI_FLAG_TE: XSPI Transfer error flag
-
HAL_XSPI_FLAG_ALL: XSPI All flags
-
-
-
void
HAL_XSPI_EnableIT
(
hal_xspi_handle_t
*
hxspi
,
uint32_t
it_source
)