Hello everyone,
I have been a lurker on these forums for a long time now and haven't posted in a long time but I am hoping somebody can assist me with an issue I am having in trying to build a USB keyboard using the STM32L082KZ for my Apollo DSKY.
I am trying to get the MCU to be recognized by my PC as a HID but even flashing the default the usbd_hid.c and usbd_hid.h files that get generated will not get it to show up as a HID. Instead, the PC sees it as an "STM32 BOOTLOADER" and Device Manager shows it as "STM Device in DFU Mode". I have been pulling out my hair trying to get this working so any help will be greatly appreciated. I have uploaded my PCB schematic as well as the configuration in CubeMX for reference.
The PCB schematic:
- U1 is the STM32
- U2 is a solid-state relay to turn on the LEDs for key backlight
- U3 is a 5V to 3.3V linear regulator
- J1 is the Micro USB 2.0 port
- J2 is 4-pin header for programming/debugging
Note that I am using the STM32L0's internal oscillator; I hope this isn't the issue
The STM32CubeMX pin configuration:
The clock configuration:
From a hardware standpoint, the PCB is getting power and I know the MCU is working because when I connect a USB cable to my PCB it shows it as an "STM32 BOOTLOADER" in Devices and Printers.