-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown USB Device (Device Descriptor Request Failed) on STM32F103C8 Custom Board with STM32duino DFU Bootloader #134
Comments
This isn't an issue with the unmodified code. There are many possible reasons why your board is not working, including incorrect clock source setting, incorrect PLL chain values, or possibly even hardware problems as you have a custom PCB Build a project using the STM32Cube IDE that has USB and get that working first, and then use those PLL settings etc in this bootloader |
I did write a program using STM32CubeIDE with virtual com port and it does get detected by the system when connected. But when the STM32Duino bootloader is flashed, it shows an unknown USB after being detected by the Windows. Isn't it possible to have a different repo or different folder for .bin files created after setting all things for XTAL16M? I created it but need to confirm if my steps are correct or not. Anyways that will be helpful if you share what exact things I need to troubleshoot for Clocks and PLL chains. |
Just to confirm you added a #define to specify 16MHz crystal ? #define XTAL16M However, I don't know if anyone ever tested whether variant works The only difference in the clock settings are
instead of
See
Look in 7.3.2 Clock configuration register (RCC_CFGR) bits 16 to 23 Bit 17 is set for the 16Mhz clock and not for the 8 Mhz clock Bit 17 PLLXTPRE: HSE divider for PLL entry i.e the code appears to be correct a divider of 2 is enabled for the 16Mhz clock. I can't see what else should be needed |
Description: I'm facing an issue with my STM32F103C8 custom board. After flashing the STM32duino DFU bootloader, the device is recognized as an "Unknown USB Device (Device Descriptor Request Failed)" on Windows.
Board Specifications:
MCU: STM32F103C8
External Oscillator: 16MHz
Custom Board Design: Yes
Steps Taken:
Bootloader Compilation and Flashing:
I downloaded the STM32duino DFU bootloader from this repository.
Modified the code to set the external oscillator to 16MHz in the hardware.h file.
Compiled the bootloader using make generic-pc13.
Successfully flashed the bootloader onto the board using an ST-Link V2 programmer.
After Flashing:
When I connect the board via USB, Windows does not recognize it correctly. It shows "Unknown USB Device (Device Descriptor Request Failed)" in Device Manager.
Troubleshooting Attempts:
Checked the USB wiring on my custom board.
Reflashed the bootloader to ensure no errors occurred during flashing.
Verified that the 16MHz oscillator is properly connected and providing a stable clock signal.
Attempted to compile with different configurations in case it was a build issue.
Relevant Code Modifications: In hardware.h, I ensured the following settings to match the 16MHz external oscillator:
System Information:
Host OS: Windows 10
USB Drivers: STM32 USB drivers for DFU gets detected when STM32 BluePill is flashed with relevant DFU bootloader.
Request for Assistance: Could you please advise if there are additional settings or configurations required to ensure USB recognition, or if there might be another cause for this issue? Any guidance on additional steps or troubleshooting would be greatly appreciated.
Thank you for your assistance.
The text was updated successfully, but these errors were encountered: