K64F RNGA register

This commit is contained in:
Jacob Barthelmeh
2016-03-10 14:35:55 -07:00
parent 1435a6ce92
commit 3976a3e2f2

View File

@@ -1160,7 +1160,13 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
int i; int i;
/* turn on RNGA module */ /* turn on RNGA module */
SIM_SCGC3 |= SIM_SCGC3_RNGA_MASK; #if defined(SIM_SCGC3_RNGA_MASK)
SIM_SCGC3 |= SIM_SCGC3_RNGA_MASK;
#endif
#if defined(SIM_SCGC6_RNGA_MASK)
/* additionally needed for at least K64F */
SIM_SCGC6 |= SIM_SCGC6_RNGA_MASK;
#endif
/* set SLP bit to 0 - "RNGA is not in sleep mode" */ /* set SLP bit to 0 - "RNGA is not in sleep mode" */
RNG_CR &= ~RNG_CR_SLP_MASK; RNG_CR &= ~RNG_CR_SLP_MASK;