cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 problem with FreeRTOS and Cryptographic Library. Timebase Source Systick -> TIMx

CObri.1
Associate III

Hello,
Im using STM32F723 and using the Cryptographic Library (https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Security:Getting_started_with_the_Cryptographic_Library).

When testing basic cmox_aead_encrypt and cmox_aead_decrypt example it works fine.

But with the target of using FreeRTOS on the MCU, I tried to switch to TIM1 for the Timebase Source, because when using FreeRTOS this has to be changed from Systick to TIMx.

But only with changing SysTick to Tim1 and NOT enabling FreeRtos I get a HardFault calling the crypto function like (cmox_aead_decrypt).

retval = cmox_aead_decrypt(CMOX_AES_GCM_DEC_ALGO,                  /* Use AES GCM algorithm */
                message_rx.payload.ciphertext, sizeof(msg_tag),     /* Ciphertext + tag to decrypt and verify */
                sizeof(Expected_Tag),                   /* Authentication tag size */
                Key, sizeof(Key),                       /* AES key to use */
                IV, sizeof(IV),                         /* Initialization vector */
                NULL, 0,               /* Additional authenticated data */
                decrypted_msg, &computed_size);    /* Data buffer to receive generated plaintext */

1LlhP.png

IOC file in the Attachment.
Does anyone have an Idea what I have to change to use the Cryptographic Library correct while running FreeRtos?

Best Regards
C.Obrist

0 REPLIES 0