Skip to content

Commit

Permalink
entropy_smartbond: Clear pending interrupts after disabling TRNG
Browse files Browse the repository at this point in the history
Clear pending interrupts after disabling TRNG to avoid
smartbond_trng_isr getting called with TRNG disabled

Signed-off-by: Ioannis Damigos <[email protected]>
  • Loading branch information
ydamigos authored and nashif committed Aug 19, 2024
1 parent 150a7cd commit bacd6c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/entropy/entropy_smartbond.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static void trng_enable(bool enable)
} else {
CRG_TOP->CLK_AMBA_REG &= ~CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Msk;
TRNG->TRNG_CTRL_REG = 0;
NVIC_ClearPendingIRQ(IRQN);

entropy_smartbond_pm_policy_state_lock_put();
}
Expand Down

0 comments on commit bacd6c3

Please sign in to comment.