Merge pull request #9318 from caixue1102/mbed-os-rda

fix bug for RDA UNO_91H:calling us ticker functions without init.
pull/9498/head
Cruz Monrreal 2019-01-24 13:25:58 -06:00 committed by GitHub
commit 899ea5991c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ void trng_init(trng_t *obj)
regval = rTRNG_CTRL | ((0x01UL << 4) | (0xFFUL << 16)); regval = rTRNG_CTRL | ((0x01UL << 4) | (0xFFUL << 16));
rTRNG_CTRL = regval & ~((0x01UL << 1) | (0x01UL << 2) | (0x01UL << 3)); rTRNG_CTRL = regval & ~((0x01UL << 1) | (0x01UL << 2) | (0x01UL << 3));
us_ticker_init();
/*Entropy data was mixed by TRNG seed and noise, so we add one 32us delay to /*Entropy data was mixed by TRNG seed and noise, so we add one 32us delay to
ensure all 32 bits of seed is entropy when init and ensure all 32 bits of seed is entropy when init and
another delay to update noise data when get data. another delay to update noise data when get data.