2024-03-24 12:14 PM
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?
Solved! Go to Solution.
2024-03-25 07:42 AM - edited 2024-03-25 07:42 AM
> 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
2024-03-24 02:55 PM - edited 2024-03-24 02:59 PM
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
2024-03-25 07:14 AM
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
2024-03-25 07:42 AM - edited 2024-03-25 07:42 AM
> 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
2024-03-25 11:03 AM
I'm embarrassed to say I had the DP/DM pins swapped. I am now have the DFU enumerating.
Thanks!