forked from wolfSSL/wolfssl
Fix for STM32 Hash with NVIC (IRQ) enabled that can cause a DINIS interrupt that does not get cleared. If the HASH NVIC tab has Interrupts enabled it can cause an IRQ to be triggered that is not cleared. This is because the wolfSSL implementation of STM32 Hash does not call the HAL HASH API's and does not use interrupts yet. ZD 19778
This commit is contained in:
@ -164,8 +164,9 @@ static void wc_Stm32_Hash_RestoreContext(STM32_HASH_Context* ctx, int algo)
|
|||||||
/* init content */
|
/* init content */
|
||||||
|
|
||||||
#if defined(HASH_IMR_DINIE) && defined(HASH_IMR_DCIE)
|
#if defined(HASH_IMR_DINIE) && defined(HASH_IMR_DCIE)
|
||||||
/* enable IRQ's */
|
/* Disable IRQ's - wolfSSL does not use the HASH/RNG IRQ
|
||||||
HASH->IMR |= (HASH_IMR_DINIE | HASH_IMR_DCIE);
|
* If using the HAL hashing API's directly it will re-enable the IRQs */
|
||||||
|
HASH->IMR &= ~(HASH_IMR_DINIE | HASH_IMR_DCIE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* reset the control register */
|
/* reset the control register */
|
||||||
|
Reference in New Issue
Block a user