cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072B USB flashing

waratu
Associate

Hello,

I am doing some initial development for a device that will use the STM32F072B MCU on its Discovery board. The device will need to have the ability to be programmed over USB. The Discovery board User manual section 5.8 states that this can be done if BOOT0 is pulled high. I do this and try to connect by using the STM32CubeProgrammer that detects that there is an STM32 Bootloader but cannot connect because of read out protection and suggests to turn on the Read Unprotect option. If I do this, and try to connect again, a new pop-up shows up that tells me to power off and power on my device. Nothing changes if I plug it out and in or press the reset button.

waratu_0-1711812618618.png

Since at the moment I can use the st-link on the discovery board, I connected that way and read the option bytes and RDP was set to AA: level 0, no protection.

Here is the readout from the log

16:21:45 : UR connection mode is defined with the HWrst reset mode
16:21:45 : USB speed : Full Speed (12MBit/s)
16:21:45 : Manuf. ID : STMicroelectronics
16:21:45 : Product ID : STM32 BOOTLOADER
16:21:45 : SN : FFFFFFFEFFFF
16:21:45 : DFU protocol: 1.1
16:21:45 : Board : --
16:21:45 : Device ID : unknown
16:21:45 : Warning: Device is under Read Out Protection
16:21:45 : Device Read Unprotect requested

waratu_1-1711812644279.png

What could I do to solve this, is it even possible to do it like that?

UPDATE:

I tried this from a different computer and I managed to do it but it was kind of buggy (sometimes it crashes in GUI, always works in CLI) but it did work. If I run it the programmer from the command line it sometimes gets further than just requesting protection:

waratu_0-1711928180130.png

Note "unknown" Device ID so it doesn't even work that far.

0 REPLIES 0