cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32H750][X-Cube-Crypto] Hash/SHA 256 lib giving Hardfault

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 

5 REPLIES 5
Jocelyn RICARD
ST Employee

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

>>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.

https://community.st.com/t5/stm32-mcus-security/how-to-enable-the-stm32h750vbt6-hw-crypto/td-p/165187

https://community.st.com/t5/stm32-mcus-security/stm32h750vbt6-access-crypt-registers-all-read-back-zero/m-p/204834

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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

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

 

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Right! i'll try it on another board and see!