drivers: entropy: nrf5: Fix ENTROPY_BUSYWAIT from hanging
Missing clear pending RNG_IRQn when generating multiple
random numbers caused CPU to hang at __WFE call in the
loop waiting for new value.
This fixes commit ddb7f88f9e ("drivers: entropy: nrf5: Fix
ENTROPY_BUSYWAIT implementation")
Fixes #9523.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
697919c5ba
commit
1359992d1a
1 changed files with 2 additions and 0 deletions
|
|
@ -297,6 +297,8 @@ static int entropy_nrf5_get_entropy_isr(struct device *dev, u8_t *buf, u16_t len
|
||||||
buf[--len] = NRF_RNG->VALUE;
|
buf[--len] = NRF_RNG->VALUE;
|
||||||
|
|
||||||
NRF_RNG->EVENTS_VALRDY = 0;
|
NRF_RNG->EVENTS_VALRDY = 0;
|
||||||
|
|
||||||
|
NVIC_ClearPendingIRQ(RNG_IRQn);
|
||||||
} while (len);
|
} while (len);
|
||||||
|
|
||||||
nrf_rng_task_trigger(NRF_RNG_TASK_STOP);
|
nrf_rng_task_trigger(NRF_RNG_TASK_STOP);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue