Skip to main content
Associate
April 23, 2025
Question

Non-working firmware when product_state is changed to "closed" - STM32H523CET6

  • April 23, 2025
  • 2 replies
  • 399 views

Hello,

I have a problem with the operation of my firmware in "closed" state of PRODUCT_STATE. When my device is in "open" mode (ED code) my firmware works perfectly fine, but when i do provisioning procedure and change state to closed (72 code), my firmware works for a second and then hangs. In that state i cannot attach a debbuger to see what going on, so I have no idea why it doesn't work. My device has trust zone disabled, it is a custom PCB with STM32H523CET6.

Thanks in advance for any help.

2 replies

Jocelyn RICARD
ST Employee
April 23, 2025

Hello @jwoj088 ,

one possible reason could be that you usage of DWT (Data Watchpoint and Trace Unit) to get the clock cycle counter.

This feature is disabled when you go in CLOSED state.

I can't see any other reason for such behaviour

Best regards

Jocelyn

 

jwoj088Author
Associate
April 29, 2025

Hello Jocelyn, 

I removed the use of DWT in my code and now the "closed" state works correctly. 

Thank you for your help.