Skip to main content
Associate
Mar 10, 2026 12:05 PM UTC
Solved

STM32TrustedPackageCreator problem with HSM, HSM_P11_Lib.dll cannot be loaded.

STM32CubeProgrammer_CLI STM32TrustedPackageCreator problem with HSM, HSM_P11_Lib.dll cannot be loaded. GUI STM32CubeProgrammer works fine. Where that dll should be located? I Am using win11 pro.

 

Kouthair
KouthairBest answer
ST Technical Moderator
Jun 30, 2026 1:20 PM UTC

Hello ​@Kipe ,
This issue has been fixed in STM32CubeProgrammer v2.23. You can download it via this link.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

6 replies

Kouthair
ST Technical Moderator
Mar 10, 2026 12:52 PM UTC

Hello @Kipe and welcome to the community! 
HSM_P11_Lib.dll should be in /bin and in /api/lib folders.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
KipeAuthor
Associate
Mar 12, 2026 7:32 AM UTC

HSM_P11_Lib.dll should be in /bin and in /api/lib folders. They are in there.

In Trusted side it can't find HSM? always error about missing .dll? Cube programmer works, why?

Kouthair
ST Technical Moderator
Mar 13, 2026 9:29 AM UTC

Hello @Kipe,
I wasn't able to reproduce this behavior on my side.
Could you please try the following and let me know the result:

  • Confirm that you installed the latest version of STM32CubeProgrammer v2.22 64-bit (since you're using Windows 11)
  • Run TrustedPackageCreator as administrator.

Also to investigate further, can you provide me the exact windows version and the full path of both TrustedPackageCreator that you're running and the HSM_P11_Lib.dll.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
KipeAuthor
Associate
Mar 25, 2026 11:21 AM UTC

hi again.

I'm using 64-bit windows 11 Pro (24H2).

so I was thinking to use 64-bit installation for cubeprogrammer.

Installation path C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\  .

Now I installed 32-bit cubeprogrammer to path

C:\Program Files (x32)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin

and from there it works now fine.

So, is there some dependency on trusted side HSM for 32-bit or what? I'm very confused now.

 

Kouthair
ST Technical Moderator
Apr 7, 2026 10:36 AM UTC

Hello @Kipe ,
I was able to recreate the issue on my side, and the team is working on a fix. (Internal ticket ID: 0061138)

I'll let you know ASAP whenever the fix is delivered.

PS: Ticket ID: 0061138 is an internal tracking number and is not accessible or usable by customers.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Kouthair
KouthairBest answer
ST Technical Moderator
Jun 30, 2026 1:20 PM UTC

Hello ​@Kipe ,
This issue has been fixed in STM32CubeProgrammer v2.23. You can download it via this link.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.