cancel
Showing results for 
Search instead for 
Did you mean: 

USB DFU HOST CLASS not working with H7 series

Strongato
Associate III

Hi everyone,

I have developed a custom USB DFU HOST class, which I use to update other stm over the usb.

I was first on the F4 series, but now switched to the G0 series because of this issue
https://community.st.com/t5/stm32-mcus-embedded-software/usb-writepacket-stuck-in-infinite-loop/td-p/870532

I am using external bypass clock, but the update worked also on HSI just fine.

These are all the bootloader versions and the chips I was able to update without any issues:
14.4 H573I-DK
9.2   L562RET6
9.0   F446ZE-NUCLEO
3.3   F207ZG-NUCLEO

But when I try to update the H745I-DISCO or the H743, the update does not work.
I checked the bootloader version on the H745I-DISCO and it's 9.0, which is the same version as F446ZE-NUCLEO which I update without any issues.

The update process to update H745I-DISCO worked one in 100 or 200 tries.
I have tried messing with timings, clocks, adding prints in the interrupt to slow things down (I know that it's a bad practice), and some things did work better, some things didn't, but the update process was always unpredictable.

It just ends up in an infinite loop between CTRL_DATA_OUT and CTRL_DATA_OUT_WAIT.

Sometimes I can do MASS_ERASE, sometimes I can't, sometimes I can send a few DNLOAD packets, and once in a blue moon the update passes.

The H7 never sends an error with GET_STATUS, my HOST usb code just gets stuck in an infinite loop, I'm not sure if the H7 is always NACK-ing me or what is happening.

I have tried updating the H7 with dfu-util, and it works fine!!!

I'm looking for any tips or pointers, what I could checkout.

Thanks!

1 REPLY 1
Pavel A.
Super User

USB bus analyzer is your friend.