Skip to content
Snippets Groups Projects
Commit e8abf592 authored by schneider's avatar schneider
Browse files

fix(trng): Enable TRNG before every read

The BLE stack disables the TRNG every time it access it...
parent 357a3f0a
No related branches found
No related tags found
No related merge requests found
...@@ -73,11 +73,6 @@ int hardware_early_init(void) ...@@ -73,11 +73,6 @@ int hardware_early_init(void)
*/ */
portexpander_init(); portexpander_init();
/*
* RNG
*/
TRNG_Init(NULL);
/* /*
* Buttons * Buttons
*/ */
......
...@@ -6,6 +6,7 @@ int epic_trng_read(uint8_t *dest, size_t size) ...@@ -6,6 +6,7 @@ int epic_trng_read(uint8_t *dest, size_t size)
if (dest == NULL) if (dest == NULL)
return -EFAULT; return -EFAULT;
TRNG_Init(NULL);
TRNG_Read(MXC_TRNG, dest, size); TRNG_Read(MXC_TRNG, dest, size);
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment