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.
Events emitted
nrf.saadc.calibratedoneSAADC offset calibration completed (EVENTS_CALIBRATEDONE fired).
Payload
Empty payload object.
nrf.saadc.doneOne SAADC sampling step completed (EVENTS_DONE fired).
Payload
Empty payload object.
nrf.saadc.endEasyDMA result buffer is full; all requested samples written (EVENTS_END fired).
Payload
| Field | Type | Description |
|---|---|---|
sample_count | u32 | Number of samples written to the result buffer. |
nrf.saadc.resultdoneSAADC result data is available in the EasyDMA buffer (EVENTS_RESULTDONE fired).
Payload
Empty payload object.
nrf.saadc.startedSAADC peripheral has started a sampling run (EVENTS_STARTED fired).
Payload
Empty payload object.
nrf.saadc.stoppedSAADC peripheral has stopped (EVENTS_STOPPED fired).
Payload
Empty payload object.
Events accepted
nrf.saadc.inject_sampleInject an ADC sample value for a given channel index. The value will be written by the next TASKS_SAMPLE.
Payload
| Field | Type | Description |
|---|---|---|
channel | u32 | Channel index (0-7). |
value | u32 | 16-bit signed ADC result (0 = 0 V; sign-extended to i16). |
Commands
This peripheral exposes no commands.
Snapshot fields
| Field | Type | Label |
|---|---|---|
| state_json | str | SAADC State (JSON) |
| inten | u32 | INTEN |
| ev_started | u32 | EVENTS_STARTED |
| ev_end | u32 | EVENTS_END |
| ev_done | u32 | EVENTS_DONE |
| ev_resultdone | u32 | EVENTS_RESULTDONE |
| ev_calibratedone | u32 | EVENTS_CALIBRATEDONE |
| ev_stopped | u32 | EVENTS_STOPPED |
| enable | u32 | ENABLE |
| running | bool | Running |
| shorts | u32 | SHORTS |
| result_maxcnt | u32 | RESULT.MAXCNT |
| result_amount | u32 | RESULT.AMOUNT |
Read at runtime with emulator.peripheral_snapshot(name).