Skip to main content
Senior
June 10, 2026
Solved

STM32L496ZGT HASH ISSUE

  • June 10, 2026
  • 4 replies
  • 111 views

Hello,

I’m facing a strnge issue in the code generated by CubeMX for the STM32L496ZG.

The project was imported in CubeIDE and compiled fine.but, as soon as HASH is activated the project no longer compiles and throws several hundreds of errors.

CubeMX version is 6.17.0

CubeIDE version is 2.1.1

Looking at the errors, it appears that the HASH symbol is not defined, resulting in the associated code being grayed out.

Regards

Best answer by zeboss49

Hello,

according to the datasheet, it has a HASH unit.

But the Product grid at url: STM32L4 - ARM Cortex-M4 ultra-low-power MCUs - STMicroelectronics states that only the L4A6 has one.

Please could do your best to fix the error in the datasheet?

 

 

4 replies

Tesla DeLorean
Guru
June 10, 2026

Check if it has a HASH unit

Try building for L4A6

 

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
zeboss49AuthorBest answer
Senior
June 10, 2026

Hello,

according to the datasheet, it has a HASH unit.

But the Product grid at url: STM32L4 - ARM Cortex-M4 ultra-low-power MCUs - STMicroelectronics states that only the L4A6 has one.

Please could do your best to fix the error in the datasheet?

 

 

Tesla DeLorean
Guru
June 10, 2026

>>Please could do your best to fix the error in the datasheet?

I don’t work for ST Micro..

The product page also states “The STM32L496xx devices embed HASH hardware accelerators.”, but is absent from the block diagram.

https://www.st.com/en/microcontrollers-microprocessors/stm32l496zg.html

Changing the product to an L4A6ZG in the IDE will allow it to compile without generating a lot of errors as it will include the right files, rather than exclude them and sub-sections bracketed with #ifdef/#endif.

You could test if the code for the HASHing does in fact work or not once you have code that builds and links properly. If the L496ZG does in-fact have the accelerator, then it’s the HAL code that needs fixing, not the data sheet.

The L496/L4A6 are basically the same IC, the former just having the encryption portion disabled/deactivated during production testing to reduce licencing costs, and import/export issues.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Super User
June 10, 2026

I don’t work for ST Micro

 

Neither do I !

@zeboss49 see this thread for how to identify actual ST people:

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.