System & Infrastructure - Hardware Semaphore - nordic,nrf-mutex
nRF5340 MUTEX (mutual exclusion)
Hardware spinlock model with 16 `MUTEX[n]` registers implementing atomic test-and-set: a read returning 0 claims the mutex, a read returning 1 means it is already held, and writing 0 releases it, per nRF5340 PS sec 7.19.
Events emitted
No peripheral-specific events. Structured activity (IRQs, DMA) surfaces through the shared event vocabulary.
Events accepted
No peripheral-specific input events. The peripheral is driven through MMIO register access.
Commands
releaseForcibly release a held mutex (fault injection). `index` is the mutex number 0-15.
| Param | Parsed as | Description |
|---|---|---|
| index | u32 | Mutex index to release (0-15). |
All params travel as strings in the command JSON; the type shows how the peripheral parses them (0x/0b prefixes accepted for integers).
Snapshot fields
| Field | Type | Label |
|---|---|---|
| claimed_mask | u32 | Claimed mask (bitmask, bit n = mutex n held) |
| state_json | str | Mutex State Summary (JSON) |
Read at runtime with emulator.peripheral_snapshot(name).