2023-06-08 07:03 AM - edited 2023-06-26 01:59 AM
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 */
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