cancel
Showing results for 
Search instead for 
Did you mean: 

NucleoG474RE USB CDC Peripheral

LHarm.1
Associate III

I want to implement communications between two MCUs over USB.
I have a Freertos application running on a Nucleog474RE board to which I've added the USB  CDC device.
I'm using CubeMX 6.11 and CubeIDE 1.15.0.

I have attached a USB cable to PA12 & PA11 and connected the other end to my PC's USB HUB.

The enumeration fails.  Windows says the device descriptor request failed.

I have tried a 1.5k pullup on DP, but saw no change.

The APP Note AN4879 doesn't seem to cover the G4 series.

At this point I don't know if my problem is with hardware, software or both.

Is there an example that works?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

> So it appears I have a hardware problem.

Swapped DP/DM pins? Incorrect connections? Bad ground? Wrong clock (see below)?

> Do I need a 1.5K pullup on DP?

No. Only 'F1 and 'F3 need it.

> Do I need the unusual voltage divider?

What's unusual in it? But no, AFAIK DFU does not detect VBUS.

---

Note, that in my post, I linked also to some debugging hints, and also warned about the STLink3's MCO in default setting not being appropriate for USB.

JW

View solution in original post

4 REPLIES 4

If your mcu supports DFU bootloader on given pins (and has the required crystal/oscillator - see AN2606), then the DFU bootloader may be an "example" which is known to work, and is already present in the mcu.

Some rudimentary debugging hints here.

If the STLink on that Nucleo is V3, note, that it's MCO output in default state is not derived from crystal thus not good for USB.

JW

LHarm.1
Associate III

I tried the bootloader DFU this morning and I see the same symptoms.

I changes the swBoot option byte, installed JP7 and jumpered PB8 to 3.3v.

I verified my app was not being started also.

 

So it appears I have a hardware problem.

Do I need a 1.5K pullup on DP?  The g474 document leads me to believe I don't.

Dop I need the unusual voltage divider?  I am trying to implement a bus powered device, so the documentation leads me to think not.

 

Larry

 

> So it appears I have a hardware problem.

Swapped DP/DM pins? Incorrect connections? Bad ground? Wrong clock (see below)?

> Do I need a 1.5K pullup on DP?

No. Only 'F1 and 'F3 need it.

> Do I need the unusual voltage divider?

What's unusual in it? But no, AFAIK DFU does not detect VBUS.

---

Note, that in my post, I linked also to some debugging hints, and also warned about the STLink3's MCO in default setting not being appropriate for USB.

JW

LHarm.1
Associate III

I'm embarrassed to say I had the DP/DM pins swapped.  I am now have the DFU enumerating.
Thanks!