How to Lock STM32L5
I am using STM32L5,
In our project, we want to create one script which will lock the bootloader option and enable RDP to 0xCC to disable JTAG.
We are using the SBSFU example as a base and developed our application on it.
In script Regration.bat, 0xAA RDP is set. whereas in the bootloader 0xBB is set.
I have commented Expected RDP error handler, to set the RDP level to 0xCC after bootup,
What is the best practice and sequence to do it?
I am performing the following sequence
1) Flash application using regration.bat SBSFU_Update.bat.
2) I have changed the following option byte value
- Enable BOOTLOCK
- Boot0 = 0
3) Change RDP level to 0xCC
After It, my bootloader is not able to boot up board. I have lost 2 chips during this process.
Before losing further chips, I want to have a clear and proper sequence of setting following option byte
1) BOOLOCK should be set
2) Boot0 should be lock
3) Disable JTAG..
@Diane POMABIA Can you please help me to achieve it?
