STM32H735xx HAL User Manual
Functions
Data_Management
HSEM Exported Functions

Functions

__STATIC_INLINE uint32_t LL_HSEM_IsSemaphoreLocked (HSEM_TypeDef *HSEMx, uint32_t Semaphore)
 Return 1 if the semaphore is locked, else return 0.
__STATIC_INLINE uint32_t LL_HSEM_GetCoreId (HSEM_TypeDef *HSEMx, uint32_t Semaphore)
 Get core id.
__STATIC_INLINE uint32_t LL_HSEM_GetProcessId (HSEM_TypeDef *HSEMx, uint32_t Semaphore)
 Get process id.
__STATIC_INLINE void LL_HSEM_SetLock (HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process)
 Get the lock by writing in R register.
__STATIC_INLINE uint32_t LL_HSEM_2StepLock (HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process)
 Get the lock with 2-step lock.
__STATIC_INLINE uint32_t LL_HSEM_1StepLock (HSEM_TypeDef *HSEMx, uint32_t Semaphore)
 Get the lock with 1-step lock.
__STATIC_INLINE void LL_HSEM_ReleaseLock (HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process)
 Release the lock of the semaphore.
__STATIC_INLINE uint32_t LL_HSEM_GetStatus (HSEM_TypeDef *HSEMx, uint32_t Semaphore)
 Get the lock status of the semaphore.
__STATIC_INLINE void LL_HSEM_SetKey (HSEM_TypeDef *HSEMx, uint32_t key)
 Set the key.
__STATIC_INLINE uint32_t LL_HSEM_GetKey (HSEM_TypeDef *HSEMx)
 Get the key.
__STATIC_INLINE void LL_HSEM_ResetAllLock (HSEM_TypeDef *HSEMx, uint32_t key, uint32_t core)
 Release all semaphore with the same core id.

Function Documentation

__STATIC_INLINE uint32_t LL_HSEM_1StepLock ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore 
)

Get the lock with 1-step lock.

Reference Manual to LL API cross reference:
RLR LOCK LL_HSEM_1StepLock
Reference Manual to LL API cross reference:
RLR COREID LL_HSEM_1StepLock
Reference Manual to LL API cross reference:
RLR PROCID LL_HSEM_1StepLock
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
Return values:
1lock fail, 0 lock successful or already locked by same core

Definition at line 239 of file stm32h7xx_ll_hsem.h.

References LL_HSEM_COREID.

__STATIC_INLINE uint32_t LL_HSEM_2StepLock ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore,
uint32_t  process 
)

Get the lock with 2-step lock.

Reference Manual to LL API cross reference:
R LOCK LL_HSEM_2StepLock
Reference Manual to LL API cross reference:
R COREID LL_HSEM_2StepLock
Reference Manual to LL API cross reference:
R PROCID LL_HSEM_2StepLock
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
processProcess id. Value between Min_Data=0 and Max_Data=255
Return values:
1lock fail, 0 lock successful or already locked by same process and core

Definition at line 224 of file stm32h7xx_ll_hsem.h.

References LL_HSEM_COREID.

__STATIC_INLINE uint32_t LL_HSEM_GetCoreId ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore 
)

Get core id.

Reference Manual to LL API cross reference:
R COREID LL_HSEM_GetCoreId
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
Return values:
Returnedvalue can be one of the following values:

Definition at line 181 of file stm32h7xx_ll_hsem.h.

__STATIC_INLINE uint32_t LL_HSEM_GetKey ( HSEM_TypeDef *  HSEMx)

Get the key.

Reference Manual to LL API cross reference:
KEYR KEY LL_HSEM_GetKey
Parameters:
HSEMxHSEM Instance.
Return values:
keyto unlock all semaphore from the same core

Definition at line 287 of file stm32h7xx_ll_hsem.h.

__STATIC_INLINE uint32_t LL_HSEM_GetProcessId ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore 
)

Get process id.

Reference Manual to LL API cross reference:
R PROCID LL_HSEM_GetProcessId
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
Return values:
Processnumber. Value between Min_Data=0 and Max_Data=255

Definition at line 193 of file stm32h7xx_ll_hsem.h.

__STATIC_INLINE uint32_t LL_HSEM_GetStatus ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore 
)

Get the lock status of the semaphore.

Reference Manual to LL API cross reference:
R LOCK LL_HSEM_GetStatus
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
Return values:
0semaphore is free, 1 semaphore is locked

Definition at line 264 of file stm32h7xx_ll_hsem.h.

__STATIC_INLINE uint32_t LL_HSEM_IsSemaphoreLocked ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore 
)

Return 1 if the semaphore is locked, else return 0.

Reference Manual to LL API cross reference:
R LOCK LL_HSEM_IsSemaphoreLocked
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
Return values:
Stateof bit (1 or 0).

Definition at line 166 of file stm32h7xx_ll_hsem.h.

__STATIC_INLINE void LL_HSEM_ReleaseLock ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore,
uint32_t  process 
)

Release the lock of the semaphore.

Note:
In case of LL_HSEM_1StepLock usage to lock a semaphore, the process is 0.
Reference Manual to LL API cross reference:
R LOCK LL_HSEM_ReleaseLock
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
processProcess number. Value between Min_Data=0 and Max_Data=255
Return values:
None

Definition at line 253 of file stm32h7xx_ll_hsem.h.

References LL_HSEM_COREID.

__STATIC_INLINE void LL_HSEM_ResetAllLock ( HSEM_TypeDef *  HSEMx,
uint32_t  key,
uint32_t  core 
)

Release all semaphore with the same core id.

Reference Manual to LL API cross reference:
CR KEY LL_HSEM_ResetAllLock
Reference Manual to LL API cross reference:
CR SEC LL_HSEM_ResetAllLock
Reference Manual to LL API cross reference:
CR PRIV LL_HSEM_ResetAllLock
Parameters:
HSEMxHSEM Instance.
keyKey value.
coreThis parameter can be one of the following values:
Return values:
None

Definition at line 304 of file stm32h7xx_ll_hsem.h.

__STATIC_INLINE void LL_HSEM_SetKey ( HSEM_TypeDef *  HSEMx,
uint32_t  key 
)

Set the key.

Reference Manual to LL API cross reference:
KEYR KEY LL_HSEM_SetKey
Parameters:
HSEMxHSEM Instance.
keyKey value.
Return values:
None

Definition at line 276 of file stm32h7xx_ll_hsem.h.

__STATIC_INLINE void LL_HSEM_SetLock ( HSEM_TypeDef *  HSEMx,
uint32_t  Semaphore,
uint32_t  process 
)

Get the lock by writing in R register.

Note:
The R register has to be read to determined if the lock is taken.
Reference Manual to LL API cross reference:
R LOCK LL_HSEM_SetLock
Reference Manual to LL API cross reference:
R COREID LL_HSEM_SetLock
Reference Manual to LL API cross reference:
R PROCID LL_HSEM_SetLock
Parameters:
HSEMxHSEM Instance.
SemaphoreSemaphore number. Value between Min_Data=0 and Max_Data=31
processProcess id. Value between Min_Data=0 and Max_Data=255
Return values:
None

Definition at line 209 of file stm32h7xx_ll_hsem.h.

References LL_HSEM_COREID.