2025-12-10 1:36 PM
Hi,
I am currently trying to update my STM32L433 on my custom board and I am having some issues with the RDP level 1.
When receiving the blank boards (not programmed yet), I use a RPI with OpenOCD and a JTag to update the chip. When I set the RDP level 1, I can't seem to find a way to restart the device with having to do a manual power cycle. I am missing something?
This is what I do :
init
reset init
stm32l4x mass_erase 0
sleep 50
flash write_image "$name"
sleep 50
reset run
After first programming, I am trying to update through USB dfu using a custom application in C# based on CubeProgrammerApi. I am able to boot the device in the Bootloader (I have control over the Boot0 and Reset pins), to connect to it, remove the readout protection (using connectDfuBootloader2) and flash the new firmware.
I am unable after that to set the readout protection using sendOptionBytesCmd("-ob rdp=0xbb") (gives me an error) and if I set it in the application itself, my STM32 cannot restart unless I do a manual power cycle...
Is there a solution that I am missing to prevent having to do a manual power cycle?
Thank you.
2025-12-10 1:38 PM
Sorry, this is what I actually do with OpenOCD :
init
reset init
stm32l4x mass_erase 0
sleep 50
flash write_image "$name"
sleep 50
stm32l4x lock 0
reset run
Also stm32l4x unlock 0 does not seem to work.