Hello! We have a application where we identify some potential errors, if we find a error we want to set the HW into HALT mode, similar to secure boot. What is the way to go?
I cannot find anything in the reference manual on how to halt the HW.
Could you please explain more in detail what you would like to do?
I am afraid we don't understand your description. Thanks
Yes, of course!
We are developing a simple secure boot mechanism. If we detect any tampering with the code we want to stop the MCU from executing. Similar to Secure boot in HSE but we dont have the HSE FW.
If (code_tampering) { stop_CPU(); } // Halt the MCU - Is go to deep sleep good practice?
else {
more code...
}
I am not sure if it is optimal use. Sleep modes are rather intended for low power use.
You could possibly use for instance SW reset with reset escalation what means that after certain amount of resets device stays in permanent reset.
But it is up to you. I would apparently recommend to use security features i..e HSE