Hello Sir, Thank you for this excellent video. But I still need your help a bit. I have a problem when I connect the card to the PC. I get the message Unknown USB device(Device Descriptor Request Failed) . What should I do to solve this problem?
Thanks, this works on my nucleo F401RE board. As nucleo board has no USB port for USB device , I have to connect USB D-(DM) to PA11 and D+(DP) to PA12 .
thanks for video but ı have a problem with keyboard hid. ı did remote control with stm32 transceiver nrf24. my problems that receiver true receiving incoming data but too much text. problems that
Awesome as ever, I learn a lot with your videos. Theres a way to make a multiple HID descriptor, Windows have 32 buttons joystick limitation and y need more than that, could be posible with 1 STM shown as 2 or more joysticks?
I think the way you could do this, is to open more endpoints. For instance, one microcontroller using one USB connection may show up as a HID device on one set of endpoints, while the same microcontroller on the same USB connection may show up as a storage device on another set of endpoints. You should be able to make several sets of endpoints, so you should be able to have several joysticks. Please don't ask me how to do this, because I've never done it myself; I've only seen such things implemented by others. Note: ST-Link v2 and later show up as storage device while it's also a 'programming adapter' that works with for instance OpenOCD - some programming adapters work both as programming adapters and USB-to-UART adapters.
This video is informative, Thank you . i have one question how can i make stm32l432 microcontroller that support the matrix keyboard (3*4) and sends information read from keyboard to the computer? can you guide and help me
Letters worked fine for me... But the media keys don't (volume up/dpwn, next/previous track etc.)... With a little research I found that I need to include this functionality to the device descriptor, but everything I've tried so far (either making my own or finding online a premade descriptor), either does not work or leads to a "driver error" on the host machine... Could you make a video on how to make your own descriptor and implement it in a simple project like the one in this video?
can you link a joystick hid descriptor? or a link for it ? also if mouse in the FS array is 0x02 and keyboard is 0x01, what is the hex number related to joystick ? thanks
Please check "define HID_EPIN_SIZE 0x04" in usbd_hid.h It has to be at least more than 8. I set it to 0x40 (64) which worked fine for me. Before the change I had the same behaviour as you described.
@@ControllersTech yeah ok. atleast if i can get the necessary functions and all required then i can give it a shot. Can you please tell me when you will be planning to release that?
I got these two errors. How can I solve that? ../Src/main.c(119): error: #167: argument of type "keyboardHID *" is incompatible with parameter of type "uint8_t *" USBD_HID_SendReport(&hUsbDeviceFS,&keyboardhid,sizeof(keyboardhid)); ../Src/main.c(122): error: #167: argument of type "keyboardHID *" is incompatible with parameter of type "uint8_t *" USBD_HID_SendReport(&hUsbDeviceFS,&keyboardhid,sizeof(keyboardhid)); ../Src/main.c: 0 warnings, 2 errors
make an array for the keyboard values uint8_t keyboardHid[8] = {0,0,0,0,0,0,0,0}; and update the values just like i did in the structure, but use keyboardHID[0], or [1], or [2] for the modifier, reserved, keycode1, etc
Sir, I have two errors on the lines of "USBD_HID_SendReport(&hUsbDeviceFS, &keyboardhid, sizeof(keyboardhid)); ". It says that "../Core/Src/main.c(163): error: #167: argument of type "keyboardHID *" is incompatible with parameter of type "uint8_t *" USBD_HID_SendReport(&hUsbDeviceFS, &keyboardhid, sizeof(keyboardhid)); ". Can you help me please?
@@ControllersTech in the keyboard hid, you know the caps lock, num lock and scroll lock. if I'm not mistaken it's an out endpoint that we need to listen to, but I'm not sure how to do that (or even if it's doable) with that usbd library. I managed to send keystrokes with my stm32f072 tho, it's amazing ^^
hi, not sure if you're still answering but would this work for a F401RE board? i followed your tutorial exactly, except for some small differences in the initial clock setup. however, when i flashed the code to the board, it does not seem to get recognized as a usb device, nor does it print anything to the computer. any insight on the matter? thanks!
All the USB related videos needs user USB port. The nucleo f401 comes with 1 USB port by default and that's for the ST link. If you want to use the USB, you need to solder a new port to your board. You can see towards the bottom, there is space given to connect it.
Hello. I tried using your code on my stm32f1 bluepill but there's still the "unknown USB device (Device descriptor Request Failed)" warning. How can I solve this issue and get the device recognized?
I didn't had any problems with win 10. Try to run the code first and then connect with the computer. Check the device manager also, could be an issue with windows device signature verification.
@@ControllersTech I have tried this but not working. I tried a new bluepill board, a different port, a different usb cable, a different laptop but still not working. This is so strange!