cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer not working with STM32F072 for USB DFU

DavePfz
Associate III

I have a design that I'm trying to bring up and program using the USB DFU capability. The board enumerates correctly in windows, but does not get into programming. It seems as though I have forgotten something, but don't know what to look for. I have checked the "Read Unprotect (MCU)" box.

I have attached the verbose log of one cycle. What happens when I try to connect is shown there and after a bit a window pops up saying to turn off the power to my device. When I do, the cycle repeats!

Thanks for any pointers...

17 REPLIES 17
gbm
Principal

Ok, guys. I was too lazy to signal this problem to ST, but it really IS a problem. Tried with few different boards under different scenarios. The current STM32Cubeprogrammer (2.18, but it was the same with 2.17) is unable to connect to STM32F072 in DFU mode. Actually I succeded maybe twice per over 100 trials and there is no deterministic path for this success.

So please, dear ST fellows, investigate and fix the problem. The same behavior may be observed with BOOT0 forced high and when invoking the bootloader from firmware (going through software reset to ensue clean chip configuration). DFU is correctly detected but once you try to connect, there is a message about memory being protected. Power off/on doesn't fix it.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
DavePfz
Associate III

So I'm not totally crazy!

Thanks

STOne-32
ST Employee

Dear @DavePfz ,

I confirm that we are working on such behavior in priority. Can you please try to confirm that inserting a Full speed hub or any hub between the Laptop/desktop and the board is fixing the issue ?  If yes, we have the hypothesis but needs to be confirmed . Thanks a lot in advance ,

Ciao

STOne-32

I used a Belkin F4U017 hub and was able to connect and perform various operations - program, erase, verify, etc. So that is one step further.

However, on programming and resetting, it still came up as STM32 BOOTLOADER in Windows 10 regardless of the state of the BOOT0 pin. (In STM32CudeProgrammer nBOOT1 is checked.) This may be a different problem.

I tried using the STLINK-V3SET to program, but on trying to connect, it always reports "Error: ST_LINK Error (DEV_TARGET_RESET_ERR)" I verified that the NRST pin is high.

So, I'm not out of the woods yet.

Again, any suggestions welcome.

Thanks

It's been a week now and no further information. Did what I give you help? Do you need more?

The project has been been put on hold until this is resolved in one way or another.

Thanks

DavePfz
Associate III

This is an update in an attempt to keep this problem alive...

I found that I have the ST32L073Z-EVAL board. That does connect correctly to the STM32CubeProgrammer.

However, as noted below by @gbm this problem seems to be associated with the STM32L072 family.

Any further ideas?

The problem occurs with F072. I have no experience with L0 series related to this - at the moment I have no L0 board with USB to work with.

The problem is still present in the brand new CubeProgrammer 2.19.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
DavePfz
Associate III

Oops! My bad. I got focused on the '07' and forgot the rest.

Just to verify, the part I am trying to program is the STM32F072CB.

Back to the drawing board.

Thanks