vemu.

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

release

Forcibly release a held mutex (fault injection). `index` is the mutex number 0-15.

ParamParsed asDescription
indexu32Mutex 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

FieldTypeLabel
claimed_masku32Claimed mask (bitmask, bit n = mutex n held)
state_jsonstrMutex State Summary (JSON)

Read at runtime with emulator.peripheral_snapshot(name).

Boards using this peripheral