vemu.

Analog - Comparator - nordic,nrf-comp

nRF5340 COMP (comparator)

Behavioral COMP model: `TASKS_START` fires `EVENTS_READY` (IRQ when enabled). `TASKS_SAMPLE` captures the comparator output. `TASKS_STOP` halts the comparator. SHORTS (READY_SAMPLE, READY_STOP, DOWN_STOP, UP_STOP, CROSS_STOP) and DPPI SUBSCRIBE/PUBLISH are supported. No real analog signal: RESULT always reads 0 (input below threshold); UP/DOWN/CROSS events never fire.

emits: signal_pulseemits: custom

Events emitted

nrf.comp.ready

COMP peripheral is ready and output is valid (EVENTS_READY fired).

Payload

FieldTypeDescription
resultu32Comparator result at the time READY fired (0 = below threshold).
nrf.comp.sampled

Comparator value was sampled by TASKS_SAMPLE.

Payload

FieldTypeDescription
resultu32Comparator RESULT register value at sample time.

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_jsonstrCOMP State (JSON)
intenu32INTEN
ev_readyu32EVENTS_READY
ev_downu32EVENTS_DOWN
ev_upu32EVENTS_UP
ev_crossu32EVENTS_CROSS
enableu32ENABLE
runningboolRunning
shortsu32SHORTS

Read at runtime with emulator.peripheral_snapshot(name).

Boards using this peripheral