IT lexicon › Hardware › Hardware semaphore

Hardware semaphore

Hardware På svenska → Updated: 2026-11-04

A peripheral register that acts as a lock between processor cores that have no other way of agreeing on anything.

Put a Cortex-M7 and a Cortex-M4 on the same die, or an application core next to a microcontroller core, and there's often no shared mechanism for atomic operations. Each core's exclusive monitor only sees its own accesses, and caches may sit in between. The fix is a block of lock registers on the shared bus: a read or write tagged with the core's ID takes the lock if it's free, and the hardware guarantees exactly one winner.

ST calls the block HSEM on the STM32H7 and STM32MP1; Texas Instruments built equivalent spinlock modules into its OMAP parts, and Linux has the hwspinlock framework to drive them. A release can often raise an interrupt on the other core, which turns the semaphore into half of the messaging layer in AMP setups.

← Back to the lexicon