Security - Crypto Accelerator - nordic,nrf-cryptocell
nRF5340 CRYPTOCELL (ARM CryptoCell-312 wrapper)
Software-fallback stub for the CC312 hardware crypto engine: the wrapper `ENABLE` register (reset value 0) and the `HOST_RGF` IRR/IMR/ICR registers are modelled, which is enough for PSA/TF-M to detect that CryptoCell is unavailable and fall back to Mbed TLS software crypto. The CC_RNG TRNG block at +0x1000 is modelled functionally (EHR entropy registers fed by a deterministic xorshift64 generator) so secure-world provisioning code that drives the TRNG register protocol directly (e.g. TF-M HUK/IAK generation) completes in VEMU. No other crypto operations are emulated.
Events emitted
nrf.cryptocell.trng_refreshFires when the TRNG entropy health registers (EHR) are refreshed, either on a TRNG_RESET write or after RNG_SW_RESET.
Payload
| Field | Type | Description |
|---|---|---|
prng_state | u64 | Current xorshift64 PRNG state after the refresh (deterministic entropy source). |
Events accepted
No peripheral-specific input events. The peripheral is driven through MMIO register access.
Commands
This peripheral exposes no commands.
Snapshot fields
| Field | Type | Label |
|---|---|---|
| state_json | str | CryptoCell State (JSON) |
| cc_enable | u32 | CC ENABLE |
| host_irr | u32 | HOST_RGF IRR (pending IRQs) |
| host_imr | u32 | HOST_RGF IMR (IRQ mask) |
| rng_imr | u32 | RNG IMR (RNG interrupt mask) |
| trng_valid | u32 | TRNG_VALID (entropy ready) |
| sample_cnt | u32 | SAMPLE_CNT (subsampling rate) |
Read at runtime with emulator.peripheral_snapshot(name).