vemu.

Timing - Timer - nordic,nrf-timer

nRF5340 TIMER

Functional TIMER/counter model: 16 MHz base clock with prescaler, `BITMODE` widths, eight CC channels with capture and compare, `SHORTS` (COMPARE-CLEAR/STOP), `ONESHOTEN`, and DPPI subscribe/publish. COMPARE events latch unconditionally and pulse the IRQ when enabled in `INTEN`.

tickableemits: signal_pulse

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

This peripheral exposes no commands.

Snapshot fields

FieldTypeLabel
state_jsonstrTIMER State Summary (JSON)
intenu32INTEN (interrupt enable mask)
runningboolRunning (timer is counting)
modeu32MODE (0=Timer, 1=Counter, 2=LowPowerCounter)
bitmodeu32BITMODE (0=16-bit, 1=8-bit, 2=24-bit, 3=32-bit)
prescaleru32PRESCALER (0-9; fTIMER = 16 MHz / 2^PRESCALER)
counteru32COUNTER (current masked value)
shortsu32SHORTS bitmask
events_compareu32EVENTS_COMPARE latch bitmask (bit i = channel i latched)

Read at runtime with emulator.peripheral_snapshot(name).

Boards using this peripheral