nrf-pac

Crates

git

Versions

nrf52840

Flavors

nrf_pac::cc_rng

Struct CcRng

Source
pub struct CcRng { /* private fields */ }
Expand description

CRYPTOCELL RNG engine

Implementations§

Source§

impl CcRng

Source

pub const unsafe fn from_ptr(ptr: *mut ()) -> Self

Source

pub const fn as_ptr(&self) -> *mut ()

Source

pub const fn rng_imr(self) -> Reg<RngImr, RW>

Interrupt mask register. Each bit of this register holds the mask of a single interrupt source.

Source

pub const fn rng_isr(self) -> Reg<RngIsr, R>

Interrupt status register. Each bit of this register holds the interrupt status of a single interrupt source. If corresponding RNG_IMR bit is unmasked, an interrupt is generated.

Source

pub const fn rng_icr(self) -> Reg<RngIcr, W>

Interrupt clear register. Writing a 1 bit into a field in this register will clear the corresponding bit in RNG_ISR.

Source

pub const fn trng_config(self) -> Reg<TrngConfig, RW>

TRNG ring oscillator length configuration

Source

pub const fn trng_valid(self) -> Reg<TrngValid, R>

This register indicates if TRNG entropy collection is valid.

Source

pub const fn ehr_data(self, n: usize) -> Reg<u32, R>

Description collection: The entropy holding registers (EHR) hold 192-bits random data collected by the TRNG. The initial EHR_DATA[0] register holds the least significant bits [31:0] of the random data value.

Source

pub const fn noise_source(self) -> Reg<NoiseSource, RW>

This register controls the ring oscillator circuit used as a noise source.

Source

pub const fn sample_cnt(self) -> Reg<u32, RW>

Sample count defining the number of CPU clock cycles between two consecutive noise source samples.

Source

pub const fn autocorr_statistic(self) -> Reg<AutocorrStatistic, RW>

Statistics counter for autocorrelation test activations. Statistics collection is stopped if one of the counters reach its limit of all ones.

Source

pub const fn trng_debug(self) -> Reg<TrngDebug, RW>

Debug register for the TRNG. This register is used to bypass TRNG tests in hardware.

Source

pub const fn rng_sw_reset(self) -> Reg<RngSwReset, W>

Reset the RNG engine.

Source

pub const fn rng_busy(self) -> Reg<RngBusy, R>

Status register for RNG engine activity.

Source

pub const fn trng_reset(self) -> Reg<TrngReset, W>

Reset the TRNG, including internal counter of collected bits and registers EHR_DATA and TRNG_VALID.

Source

pub const fn rng_hw_flags(self) -> Reg<RngHwFlags, R>

Hardware configuration of RNG engine. Reset value holds the supported features.

Source

pub const fn rng_clk(self) -> Reg<RngClk, W>

Control clock for the RNG engine.

Source

pub const fn rng_dma(self) -> Reg<RngDma, RW>

Writing to this register enables the RNG DMA engine.

Source

pub const fn rng_dma_rosc_len(self) -> Reg<RngDmaRoscLen, RW>

This register defines which ring oscillator length configuration should be used when using the RNG DMA engine.

Source

pub const fn rng_dma_sram_addr(self) -> Reg<RngDmaSramAddr, RW>

This register defines the start address in TRNG SRAM for the TRNG data to be collected by the RNG DMA engine.

Source

pub const fn rng_dma_samples_num(self) -> Reg<RngDmaSamplesNum, RW>

This register defines the number of 192-bits samples that the RNG DMA engine collects per run.

Source

pub const fn rng_watchdog_val(self) -> Reg<u32, RW>

This register defines the maximum number of CPU clock cycles per TRNG collection of 192-bits samples. If the number of cycles for a collection exceeds this threshold the WATCHDOG interrupt is triggered.

Source

pub const fn rng_dma_busy(self) -> Reg<RngDmaBusy, R>

Status register for RNG DMA engine activity.

Trait Implementations§

Source§

impl Clone for CcRng

Source§

fn clone(&self) -> CcRng

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl PartialEq for CcRng

Source§

fn eq(&self, other: &CcRng) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for CcRng

Source§

impl Eq for CcRng

Source§

impl Send for CcRng

Source§

impl StructuralPartialEq for CcRng

Source§

impl Sync for CcRng

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.