vemu.

Connectivity - SPI - nordic,nrf-qspi

nRF5340 QSPI (quad SPI external flash interface)

Behavioral QSPI model with no external flash connected: every task (`ACTIVATE`, `DEACTIVATE`, erase tasks, `READ`, `WRITE`) latches `EVENTS_READY` immediately (IRQ when enabled). `TASKS_READ` fills the destination buffer with `0xFF` (erased flash) via EasyDMA; writes and erases are discarded. Custom events `nrf.qspi.transfer` and `nrf.qspi.erase` are emitted for host-side observation.

tickablegeneric_dmaemits: signal_pulseemits: dmaemits: custom

Events emitted

nrf.qspi.erase

Emitted when a QSPI erase task completes (TASKS_ERASESTART, TASKS_ERASE128, TASKS_ERASE4, or TASKS_ERASE). Carries the flash pointer and the erase length in bytes.

Payload

FieldTypeDescription
lenu32Number of bytes erased (0 when the length register is 0).
ptru32Flash address at which the erase began.
nrf.qspi.transfer

Emitted when a QSPI read or write transfer completes (TASKS_READ or TASKS_WRITE). The `direction` field is `"read"` or `"write"`.

Payload

FieldTypeDescription
direction"read" | "write"Transfer direction: `"read"` or `"write"`.
dstu32Destination address (SRAM address for reads, flash offset for writes).
lenu32Transfer length in bytes.
srcu32Source address (flash offset for reads, SRAM address for writes).

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_jsonstrQSPI State Summary (JSON)
intenu32INTEN
ev_readyu32EVENTS_READY
enableu32ENABLE
read_cntu32READ.CNT
write_cntu32WRITE.CNT
erase_ptru32ERASE.PTR
erase_lenu32ERASE.LEN

Read at runtime with emulator.peripheral_snapshot(name).

Boards using this peripheral