Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer and CLI cannot unlock device

Associate II

I'm using a custom board for the STM32F070 device. I can't seem to connect to the USB DFU due to the device being in read protect level 1. I've verified that it is not in level 1, but actually level 0, using the ST-Link Utility and Cube Programmer via an ST-link.



When I use the CLI, I get a message saying that the read protection is set and I should unlock it. When I do, the device still acts as though it is in read protection level 1. 


When I try to unlock it using the CubeProgrammer, I either get an error saying the device is read protected or that I need to power cycle the device, but still won't connect.





I have also confirmed that the USB connection is fine by simply printing "HelloWorld!" to a putty console.



Any ideas as to why the device seems to automatically re-lock, or just not want to talk when in the USB DFU?

Associate II

Ok so I found that using a USB dongle between the board and computer was the work-around found about 2 years ago. I think we're still waiting to hear back on if this is a bug that plans to be fixed or if there is some other work-around that can be used to reliably upload firmware programmatucally.