2021-05-14 09:53 AM
Hi all,
I build a prototype board based on STM32G431KBT6 which need Virtual COM port and DFU firmware upload. In previous version of the prototype everything worked fine.
Windows detected the board, I was able to send/receive commands over VCP and also with the boot pin I got it in DFU mode.
The new prototype should be 100% the same, but after sending some commands, the com port disappears and never comes back.
Also on other WIndows machines it is not found anymore.
As if I damaged the USB PHY or something.
So I got back at my lab, soldered a new chip, enumeration worked again, got to my client, send some commands, same dead board.
Led blink is running, but it doesn't detect the USB anymore.
I'm wondering if I'm wiring it wrong.
Should I pull-up USB_DP ?
Are the USB_DP en DM pins on the microcontroller 5v tolerant?
I also noticed IDE wanted to migrated my project to a newer version.
I got the USB_DETECT pin from an example on the web, but I think I'm not doing anything with it at the moment.
2021-05-18 10:05 AM
I'm still pulling my hair out on this one.
It becomes a problem when I connect the prototype to my clients host PC.
This PC isn't connected to the internet and probably doesn't have the right VCP drivers.
So no enumeration on my client's PC
But after that also no enumeration on my laptop anymore.
My main loop has a led blink, that is still blinking.
But no device (my laptop, client pc, my lab PC) detect the USB anymore.
So I though, ok maybe my client's pc has a short in the usb cable.
But when I connect an Arduino Nano on his cable, it does detect it.
So how can a host pc enumeration damage the USB PHY?
Maybe my heap size 0x800 isn't enough?
But when I erase the chip and reprogram it, I would expect I'm repairing heap overflows.
2021-05-18 04:00 PM
What is L1 and what is D1?
Try to remove them (bridging L1 of course).
How is GND and the mcu's ground connected? Make sure they are properly shorted. Measure ground difference between your board and the PC which "kills" it.
JW
2021-05-19 04:12 AM
L1 is a common mode choke and D1 is a TVS diode
Removing them didn't help.
I discovered the host pc is powered via a floating DC adapter and my prototype also.
I measure 86V! AC between PC casing and min pole of my prototype adapter.
Can I force two floating DC adapters to level there "grounds"? Or do I have a ground loop here?