2025-09-04 4:16 AM
Greetings,
I'm making a project, using a B-U585I-IOT02A board in which I made a Java program that can flash a firmware (using the USB DFU protocol) and also set Readout Protection to Level 1 through the Option Bytes. The program can flash the firmware and set RDP level 1 successfully, but I wanted to be able to flash a firmware, using the USB DFU while having the RDP set to level 1 and I can't. Every time I set the RDP level 1, I can't upgrade using USB DFU, I need to use the STLINK, go to the STM32CubeProgrammer and set the Option Bytes back to level 0, which will mass erase the flash.
I know I can't do all this with the STM32CubeProgrammer, but I want to be able to do it with my program (for personal reasons).
So the question is, how can I upgrade the firmware using USB DFU, with RDP set to level 1?
Thank you!