STM32_Crypto on STM32L431
Hello,
I am trying to use "STM32CubeExpansion_Crypto_V3.1.0" library for generating HMAC_SHA1 on STM32L431 processor. We are using FreeRTOS.
Issue description: When we make a function call to the HMAC_SHA1 functions contained in the above library, it returns successfully with the HASH, but the code hangs immediately after that. Sometimes it gives "Hard Fault" and hangs and at other times it just hangs without giving any error message.
Interesting thing to note is that, when we call the same functions from outside of any Task (from timer interrupt for example) it works just fine. But when we call these set of functions from within a task (say application task) the code hangs after executing the HMAC_SHA1 functions.
Could anyone please point out what could be going wrong? Thanks.
A few points to note:
- I am using the __CRC_CLK that is needed for running the crypto library.
- Have tried using critical sections - enable critical section before the HASH function calls and disable after returning from them. But this doesn't help.
Thanks.
Best regards
satish