STM32F405 and HAL USB-CDC strange behavior: Com-Port error & USBD_MAX_STR_DESC_SIZ
Hi,
some questions about the HAL USB-CDC (USB_FS) implementation. I use a STM32F405 with TrueStudio and CubeMX (for code generation) and Win10. I changed, as suggested from ST, the heap (0x1000) and stack (0x800) size. The USB CDC user Buffers are 128 bytes each and the USBD_MAX_STR_DESC_SIZ Buffer is 256 bytes.
Questions to begin with:
What is the use case for USBD_MAX_STR_DESC_SIZ Buffer?
Do we store the configured USB-descriptors in this buffer? see https://www.beyondlogic.org/usbnutshell/usb5.shtml#DeviceDescriptors
How big should this Buffer be (minimal)?
My problem:
When i change the Buffersize (USBD_MAX_STR_DESC_SIZ) to lower values than 256 or higher values than 512 bytes the USB device is recognized by the OS (WIN10) but i cannot connect to the device/com-port via HTerm or an application. What could be the reason for this behavior?