vemu.

Analog - ADC - nordic,nrf-saadc

nRF5340 SAADC (successive-approximation ADC with EasyDMA)

Functional SAADC model with no analog front-end. `TASKS_SAMPLE` fills the EasyDMA result buffer with zero samples (0 V input) and latches `RESULTDONE`, `DONE`, and `END` immediately; `TASKS_START` latches `STARTED` and `TASKS_CALIBRATEOFFSET` completes instantly with `CALIBRATEDONE` (IRQ when enabled). DPPI subscribe/publish is supported. External samples can be injected via `nrf.saadc.inject_sample` Custom inputs.

tickablegeneric_dmaemits: signal_pulseemits: dmaemits: customhandles: custom

Events emitted

nrf.saadc.calibratedone

SAADC offset calibration completed (EVENTS_CALIBRATEDONE fired).

Payload

Empty payload object.

nrf.saadc.done

One SAADC sampling step completed (EVENTS_DONE fired).

Payload

Empty payload object.

nrf.saadc.end

EasyDMA result buffer is full; all requested samples written (EVENTS_END fired).

Payload

FieldTypeDescription
sample_countu32Number of samples written to the result buffer.
nrf.saadc.resultdone

SAADC result data is available in the EasyDMA buffer (EVENTS_RESULTDONE fired).

Payload

Empty payload object.

nrf.saadc.started

SAADC peripheral has started a sampling run (EVENTS_STARTED fired).

Payload

Empty payload object.

nrf.saadc.stopped

SAADC peripheral has stopped (EVENTS_STOPPED fired).

Payload

Empty payload object.

Events accepted

nrf.saadc.inject_sample

Inject an ADC sample value for a given channel index. The value will be written by the next TASKS_SAMPLE.

Payload

FieldTypeDescription
channelu32Channel index (0-7).
valueu3216-bit signed ADC result (0 = 0 V; sign-extended to i16).

Commands

This peripheral exposes no commands.

Snapshot fields

FieldTypeLabel
state_jsonstrSAADC State (JSON)
intenu32INTEN
ev_startedu32EVENTS_STARTED
ev_endu32EVENTS_END
ev_doneu32EVENTS_DONE
ev_resultdoneu32EVENTS_RESULTDONE
ev_calibratedoneu32EVENTS_CALIBRATEDONE
ev_stoppedu32EVENTS_STOPPED
enableu32ENABLE
runningboolRunning
shortsu32SHORTS
result_maxcntu32RESULT.MAXCNT
result_amountu32RESULT.AMOUNT

Read at runtime with emulator.peripheral_snapshot(name).

Boards using this peripheral