37 rccEnableAHB2(RCC_AHB2ENR_RNGEN, 0);
38 RNG->CR |= RNG_CR_RNGEN;
43 RNG->CR &= ~RNG_CR_RNGEN;
44 rccDisableAHB2(RCC_AHB2ENR_RNGEN);
50 while ((RNG->SR & RNG_SR_DRDY) == 0) {};
56 return (RNG->SR & RNG_SR_CECS) || (RNG->SR & RNG_SR_SECS);
61 RNG->SR &= ~(RNG_SR_SEIS | RNG_SR_CEIS);
static void TRNGStop(void)
bool rng_get(uint32_t *rand_nr)
static bool TRNGGenerate(size_t size, uint32_t *out)
static uint32_t TRNGGet(void)
static bool TRNGGetErrors(void)
uint32_t rng_wait_and_get(void)
static void TRNGClearErrors(void)
static void TRNGStart(void)
arch independent Random Number Generator API
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.