2025-06-27 7:05 AM - edited 2025-06-27 9:11 AM
We attempted to change the product state to "Closed" on STM32H523, and this operation was successful. We can perform a full regression to the "Open" state. However, we are experiencing unexpected behaviour during the provisioning stage. The code in the microcontroller was not executing, and the Keil debugger was unable to connect with an error message "Could not Stop Cortex-M device". A reset did not resolve the issue, indicating that the code could not run. After switching the microcontroller to the "Closed" product state, the code ran properly again.
We likely need to modify specific settings in the options byte to enable the code to run during the provisioning state. We would appreciate assistance in resolving this issue, as we would like to change the product state and write the .obk file directly from the firmware.
Solved! Go to Solution.
2025-06-30 12:46 AM
Hello @zhiv12 ,
In Provisioning state the user code will never run.
This state is only dedicated to provisioning phase where you can provide obk files.
You may also change some option bytes at this stage.
You can check this behaviour in the reference manual in Boot Modes chapter.
Best regards
Jocelyn
2025-06-30 12:46 AM
Hello @zhiv12 ,
In Provisioning state the user code will never run.
This state is only dedicated to provisioning phase where you can provide obk files.
You may also change some option bytes at this stage.
You can check this behaviour in the reference manual in Boot Modes chapter.
Best regards
Jocelyn