STM32F4 libusb-win32 with FREERTOS problem
Hello,
I'm using STM32F407VGT board to send and receive data to/from a Nodejs application via libusb. This works correctly when not using freeRTOS, but as soon as i create a freeRTOS task or use any CMSIS function such as osDelay() the board's usb device is no longer recognized by my windows 10, and my Nodejs app prints this to the console:
libusb: error [init_device] device 'USB\VID_0000&PID_0002\5&15165C90&0&2' has invalid descriptor!
libusb: warning [winusb_get_device_list] failed to initialize device 'USB\VID_0000&PID_0002\5&15165C90&0&2'
I have modified some usbd_desc.c and usbd_cdc.c files to make it compatibe with libusb (without freeRTOS) as shown in this video from STMicroelectronics: (starting from minute 6) https://www.youtube.com/watch?v=ft8LXVcYFRg
The changes are as folllows:
in usbd_desc.c changed the bDeviceClass and bDeviceSubClass to 0,
in usbd_cdc.c removed the interrupt endpoint
In usbd_cdc.h changed USB_CDC_CONFIG_DESC_SIZ to 32 instead of 67
installed WinUSB driver for the device
Removing these modifications freeRTOS no longer causes the mentioned issue but the USB no longer works
If anyone has a clue please help
