I am using STM32F407VG chip in my own PCB. I design MCU part of the PCB according to DISCOVERY board since it has the same controller. The board seems to work just fine. I tried ADC, DAC, SPI, USART, and simple GPIO; I use a ST-Link V2 to program the chip via SWD. Somehow, I couldn't make USB worked, but I have a DISCO board (the one with tft lcd MCU:STM32F429ZIT) the code working fine in this board. I tried both Custom HID interface and CDC (Communication Device Class) using CubeMx. I thought that both MCUs are from same family STM32F4 andthey have same HAL libraries, one code working in one of them should work in another. (I use Keil uVision5)
I need to create 64 bytes communication with the host (i.e. PC) via USB. So, I need Custom HID interface however, so far I couldn't make my USB to recognized by PC.
The only hardware difference, I could find between my PCB and Discovery board regarding USB connections is that there is a 22 ohms serial resistor in D+ & D- lines. In fact, I scratched lines one of my spare board and soldered 22 ohms resistors to mimic Discovery board. Unfortunately, It didn't change a thing.
So, I don't know whether my problem is from hardware or software. Here is the CUSTOM_HID_ReportDesc configuration,
This setup is working in DISCO board, but has no effect on my PCB.
I even used the same clock configurations and tried both selecting DISCO board and STM32F429 chip in CubeMX. Examples I find online guide me to here and right now I am in a dead end. Any help will be appreciated, thank you for your time and knowledge before end.
Note: I attached PCB schematic and USB project.
Help me Obi-Wan Kenobi, you are my only hope!