
Hardware semaphore (HSEM)
RM0453
368/1454
RM0453 Rev 2
8.3.6
HSEM COREID semaphore clear
All semaphores locked by a COREID can be unlocked at once by using the HSEM_CR
register. Write COREID and correct KEY value in HSEM_CR. All locked semaphores with a
matching COREID are unlocked, and may generate an interrupt when enabled.
Note:
This procedure may be used in case of an incorrect functioning AHB bus master ID, where
another AHB bus master can unlock the locked semaphores by writing the COREID of the
incorrect functioning processor into the HSEM_CR register with the correct KEY value. This
unlocks all locked semaphores with a matching COREID.
An interrupt may be generated for the unlocked semaphore(s). To this end, the semaphore
interrupt must be enabled in the HSEM_CnIER registers.
8.3.7 HSEM
interrupts
An interrupt line hsem_intn_it per processor allows each semaphore to generate an
interrupt.
An interrupt line provides the following features per semaphore:
•
interrupt enable
•
interrupt clear
•
interrupt status
•
masked interrupt status
With the interrupt enable (HSEM_CnIER) the semaphores affecting the interrupt line can be
enabled. Disabled (masked) semaphore interrupts do not set the masked interrupt status
MISF for that semaphore, and do not generate an interrupt on the interrupt line.
The interrupt clear (HSEM_CnICR) clears the interrupt status ISF and masked interrupt
status MISF of the associated semaphore for the interrupt line.
The interrupt status (HSEM_CnISR) mirrors the semaphore interrupt status ISF before the
enable.
The masked interrupt status (HSEM_CnMISR) only mirrors the semaphore enabled
interrupt status MISF on the interrupt line. All masked interrupt status MISF of the enabled
semaphores need to be cleared to clear the interrupt line.