cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072XXXX USB DFU Issue

Beta
Associate

Hello everyone, I have been researching and developing the stm32f072c8t6-based development board for about a few months without any converter or St-link programmer products, so I am choosing USB line products specifically.
But there is a problem that this MCU cannot connect directly to the computer, the MCU needs a USB Hub (Forum link at the bottom of this post.)
I have reviewed a few application notes, but the MCU does not require any external circuits or components for USB connection.(If I missed it, forgive me.)
Especially ST employees, can we implement a circuit design that can solve this situation or bypass it?

By the way, when I watch the MCU's communication with the Computer with the Logic analyzer, I see that it constantly gives this table Dec:
name type start_time duration value   (Numbers are seconds)
USB LS and FS v1frame -0.000000083 0.000000667 SYNC
USB LS and FS v1frame 0.000000583 0.000000667 PID SOF
USB LS and FS v1frame 0.00000125 0.000000917 Frame # 0x166
USB LS and FS v1frame 0.000002167 0.000000417 CRC OK 0x0D
USB LS and FS v1frame 0.000002583 0.00000025 EOP
USB LS and FS v1frame 0.000999917 0.000000667 SYNC
USB LS and FS v1frame 0.001000583 0.000000667 PID SOF
USB LS and FS v1frame 0.00100125 0.000000917 Frame # 0x167
USB LS and FS v1frame 0.001002167 0.000000417 CRC OK 0x12
USB LS and FS v1frame 0.001002583 0.00000025 EOP

But if I press the reset button, a different result comes out:

After NRSTAfter NRST

I think the MCU is trying a connection in the marked field;

The First PID SETUP area:
name type start_time duration value
USB LS and FS v1frame 2.4505765 0.000000667 PID SETUP
USB LS and FS v1frame 2.450577167 0.000000917 Address=0x00 Endpoint=0x00
USB LS and FS v1frame 2.450578083 0.000000417 CRC OK 0x02
USB LS and FS v1frame 2.4505785 0.00000025 EOP
USB LS and FS v1frame 2.450579167 0.000000667 SYNC
USB LS and FS v1frame 2.450579833 0.000000667 PID DATA0
USB LS and FS v1frame 2.4505805 0.000000667 bmRequestType=0x80 Data direction=Device to host, Type=Standard, Recipient=Device
USB LS and FS v1frame 2.450581167 0.000000667 bRequest=0x06 GET_DESCRIPTOR
USB LS and FS v1frame 2.450581833 0.000001333 wValue=0x0100 Descriptor=DEVICE, Index=0x00
USB LS and FS v1frame 2.450583167 0.000001333 wIndex=0x0000
USB LS and FS v1frame 2.4505845 0.000001333 wLength=0x0040
USB LS and FS v1frame 2.450585833 0.000001333 CRC OK 0x94DD
USB LS and FS v1frame 2.450587167 0.00000025 EOP
USB LS and FS v1frame 2.450587667 0.000000667 SYNC
USB LS and FS v1frame 2.450588333 0.000000667 PID ACK
USB LS and FS v1frame 2.450589 0.00000025 EOP
USB LS and FS v1frame 2.450592667 0.000000667 SYNC
USB LS and FS v1frame 2.450593333 0.000000667 PID IN
USB LS and FS v1frame 2.450594 0.000000917 Address=0x00 Endpoint=0x00
USB LS and FS v1frame 2.450594917 0.000000417 CRC OK 0x02
USB LS and FS v1frame 2.450595333 0.00000025 EOP
USB LS and FS v1frame 2.450595833 0.000000667 SYNC
USB LS and FS v1frame 2.4505965 0.000000667 PID NAK
USB LS and FS v1frame 2.450597167 0.00000025 EOP
USB LS and FS v1frame 2.450617667 0.000000667 SYNC
USB LS and FS v1frame 2.450618333 0.000000667 PID IN
USB LS and FS v1frame 2.450619 0.000000917 Address=0x00 Endpoint=0x00
USB LS and FS v1frame 2.450619917 0.000000417 CRC OK 0x02
USB LS and FS v1frame 2.450620333 0.00000025 EOP
USB LS and FS v1frame 2.450620833 0.000000667 SYNC
USB LS and FS v1frame 2.4506215 0.000000667 PID DATA1
USB LS and FS v1frame 2.450622167 0.000000667 bLength=0x12
USB LS and FS v1frame 2.450622833 0.000000667 bDescriptorType=0x01 DEVICE
USB LS and FS v1frame 2.4506235 0.000001333 bcdUSB=0x0100 1.00
USB LS and FS v1frame 2.450624833 0.000000667 bDeviceClass=0x00 Deferred to Interface Descriptors
USB LS and FS v1frame 2.4506255 0.000000667 bDeviceSubClass=0x00
USB LS and FS v1frame 2.450626167 0.000000667 bDeviceProtocol=0x00
USB LS and FS v1frame 2.450626833 0.000000667 bMaxPacketSize0=0x40
USB LS and FS v1frame 2.4506275 0.000001333 idVendor=0x0483 Vendor=STMicroelectronics
USB LS and FS v1frame 2.450628833 0.000001333 idProduct=0xDF11
USB LS and FS v1frame 2.450630167 0.000001333 bcdDevice=0x2200 22.00
USB LS and FS v1frame 2.4506315 0.000000667 iManufacturer=0x01
USB LS and FS v1frame 2.450632167 0.000000667 iProduct=0x02
USB LS and FS v1frame 2.450632833 0.000000667 iSerialNumber=0x03
USB LS and FS v1frame 2.4506335 0.000000667 bNumConfigurations=0x01
USB LS and FS v1frame 2.450634167 0.000001333 CRC OK 0x165C
USB LS and FS v1frame 2.4506355 0.00000025 EOP

Like that, I didn't quite understand the situation I was in, but these are the findings I was able to get, I want to overcome this situation because there aren't too many different options for changing the design of the MCU.

By the way the system gets its power from Vbus line and there is nothing on D+, D- lines, traces are short and of equal length. I also tried many different combinations but the result is always the same.

Thank you.

I am also attaching the .xlsx files of the tables containing all analysis reports.
https://community.st.com/t5/stm32cubeprogrammer-mcus/dfu-mode-read-out-protection/td-p/682719 

4 REPLIES 4
Pavel A.
Super User

So your device works with a hub but not directly with a computer. Try a different computer from a reputable brand (but not a mac book). If still does not work, the device likely has electrical USB compatibility problems, and USB SIG tests are recommended.  If the device works with more than one "good" computers, blame the other computers )) and use hubs as you already do. Good hubs can straighten some electrical issues.

 

 

STOne-32
ST Employee

Dear @Beta ,

I saw, you are facing same issue using internal bootloader on STM32F0 MCU and adding an external hub is fixing it, right ?   as provided here https://community.st.com/t5/stm32cubeprogrammer-mcus/dfu-mode-read-out-protection/td-p/682719

Do you have the means to download firmware via SWD instead at your hardware level - and ST-Link connector ?  instead. it can be an option also .

Let us know

STOne-32.

I appreciate it. That post solved the problem but I want to understand how the hub fixes the communication.

And yes I am trying to program microcontrollers with USB DFU feature, not with any ST-Link product or Arm SWD feature. My goal is little bit avoid hardware level and simplest board design.

Thank you i will try it, and let's you know.