2024-07-01 04:42 AM
Hello,
I am using STM32H750 and X-Cube-Crypto lib.
I am working on a secure boot and want to calculate the app Hash value to check integrity. The library works fine for STM32L5 Mcu (Already tested) but not with STM32H750. I verified that I am using the correct lib libSTM32Cryptographic_CM7.a.
The issue I get is a Hardfault triggered by a function in the lib. When I investigated more, I found that The Mcu tries to load data from a Peripheral Register not mapped for STM32H750 MCU.
What do yo think could be the issue?
Thanks,
Ayoub
2024-07-01 08:43 AM
Hello @Ayoub Cheggari ,
Please start from STM32H743 example.
For instance, this one:
STM32CubeExpansion_Crypto_V4.2.0\Projects\NUCLEO-H743ZI\Applications\Hash\SHA2_Digest\
Best regards
Jocelyn
2024-07-01 08:56 AM
>>Peripheral Register not mapped for STM32H750 MCU
Which one?
There were at least a couple of batches of H750 where the CRYP unit was not enabled. @Pavel A. made a test routine.
2024-07-01 09:30 AM
Thank you for your Response!
I am not using HW peripherals, it's all SW (I think CRC is used) !
When calling one of the lib Functions (don't know which one of course), I can see in assembly a load from a Peripheral Register which does not exist in the H750 Mapping.
Is this still relevant to what you said?
Thanks
2024-07-02 02:14 PM
The CRC peripheral is used to platform lock to STM32 HW, not aware it traps, but the library generally expects the CRC peripheral to be enabled.
But as you said, it's outside the anticipated decode space.
STM32H750 should support SHA-1 / SHA-2 in the HW HASH unit
2024-07-09 07:32 AM
Right! i'll try it on another board and see!
2024-07-31 01:41 AM
Hello @Ayoub Cheggari
Do you use the cmox_initialize function with a NULL parameter?
If so, you can try to force the STM32 selection (bypass the automatic detection) by doing something like that:
----
cmox_init_arg_t InitArg = {CMOX_INIT_TARGET_H7, NULL};
if (cmox_initialize(&InitArg) == CMOX_INIT_FAIL)
{
ErrorHandler();
}
----
BR