2022-07-25 02:48 AM
Hi,
Lot of people had this issue, nothing worked for me and I think it might be a newbie mistake.
I'm trying to communicate in USB between my PC (host) and a stm32f429ZI board (device).
The size of the heap shouldn't be an issue as it seem like the memory allocation for the header is static. But I still tried to increase it to 0x2000.
I also tried to change the PC and the stm32f429zi board. No success.
Here are the schematics for the USB pins of this board.
I measured:
VCC 5.1V
D- 0V
D+ 2.9V
ID 0V
GND 0V
I tried to activate the VBUS as well even if my power source is from the PC and that I get the 5V on VCC, no improvement
My STMcube settings and clock:
Usb device is activated and set to Communication device class
My windows driver is this one:
The MX_USB_DEVICE_Init() function runs with no problem
Any lead?
Thanks
Solved! Go to Solution.
2022-07-25 05:14 AM - edited 2023-11-20 08:07 AM
I changed the clock ouput to this and it works now. Really feels ****. I don't know how I could have known.
Thanks for the help anyway man, you would have probed the signal with a logic analyzer?
The pins are so little I didn't try to do that.
2022-07-25 04:44 AM
Cable? Charging cables are no good.
Check you're using the right USB peripheral. Instrument code so you can observe interactions with the host.
Have drivers that recognize the VID/PID of your device, check host sees the right numbers.
2022-07-25 05:14 AM - edited 2023-11-20 08:07 AM
I changed the clock ouput to this and it works now. Really feels ****. I don't know how I could have known.
Thanks for the help anyway man, you would have probed the signal with a logic analyzer?
The pins are so little I didn't try to do that.
2022-07-25 05:29 AM
No, probably not, there are things like USB Analyzers, and if i still wanted to looks at the signals I'd split a cable. I'd start by assuming it's not a USB bus/signalling problem, and that a scope rather than an LA would be required if it were.
But you can instrument the code on the device side to understand the interaction, and I've written Windows drivers, and filter drivers, where I can see what's going on over on the host side.
So some clocks too slow? There's perhaps notes in RM to avoid clock inversion and expectations. The PLL needs to be running for sure, along with solid 48 MHz. Things like SDIO have clock ratio expectations and PLL requirements, for sure.
2022-07-25 05:49 AM
Yeah I didn't feel like writing my own Win driver but good to know.
I only check the RM if something is wrong, but I bet they talk about it.
have a good one :)
2023-07-10 12:56 PM
I'm currently having these problems with the USB not being recognized and I even debugged it, I was waiting for the code to stop at "usbd_storage_if.c" but it never enters the routines of that file. Can you help me?