RNG: Bugfix in STOP subscription

And remove an unnecessary write in the HAL

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-09-18 16:51:15 +02:00
parent 800731872a
commit d084647bd7
2 changed files with 1 additions and 3 deletions

View File

@ -148,7 +148,7 @@ void nhw_rng_regw_sideeffects_SUBSCRIBE_STOP(unsigned int inst) {
static struct nhw_subsc_mem STOP_subscribed[NHW_RNG_TOTAL_INST];
nhw_dppi_common_subscribe_sideeffect(nhw_rng_dppi_map[inst],
NRF_RNG_regs.SUBSCRIBE_START,
NRF_RNG_regs.SUBSCRIBE_STOP,
&STOP_subscribed[inst],
(dppi_callback_t)nhw_rng_task_stop,
DPPI_CB_NO_PARAM);

View File

@ -16,10 +16,8 @@ void nrf_rng_task_trigger(NRF_RNG_Type * p_reg, nrf_rng_task_t rng_task)
*((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)rng_task)) = 0x1UL;
if ( rng_task == NRF_RNG_TASK_START ) {
NRF_RNG_regs.TASKS_START = 1;
nhw_rng_regw_sideeffects_TASK_START();
} else if ( rng_task == NRF_RNG_TASK_STOP ) {
NRF_RNG_regs.TASKS_STOP = 1;
nhw_rng_regw_sideeffects_TASK_STOP();
} else {
bs_trace_error_line_time("Not supported task started in nrf_rng\n");