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);