2015-06-03 02:37 AM
Hi,
I've recently try to use code generated by CubeMX to prepare simple USB<->UART converter. Everything goes almost ok but inside function CDC_Control_FS(...) [usbd_cdc_if.c] in case ''CDC_SET_LINE_CODING'' inside buffer I should have received setting for uart (set on PC by user) but the only one setting that is inside function buffer is baud rate, nothing more :( Could somebody tell my why, or what shall I do to deal with that?P.S Is there any maual for Cube library (I've found only sheet with about 58 pages)? #stm32f4 #usb #uart #cubemx #cdc2015-06-12 03:29 AM
Hi,
You can refer to the example inSTM32Cube_FW_F4_V1.6.0\Projects\STM324xG_EVAL\Applications\USB_Device\CDC_Standalone.
Also have a look to UM1720 and UM1725.2017-02-04 10:01 AM
I ran into another imperfection of the CDC Class. That regards the handling of control messages to 'CDC_Control_FS '. Some of the messages make use of the wValue in the control message, which is not passed as a parameter. I expect that the orginal specification ( see
https://cscott.net/usb_dev/data/devclass/usbcdc10.pdf
) from 1998:(
is still valid.I have noticed that CDC_Control_FS is called with SET_CONTROL_LINE_STATE updating the virtual DTR and DCD handshake lines whenever the terminal program in the host opens or closes the COM port. But since the port can be opened without handshaking, this doesn't reflect the port status. So I haven't found a method to detect whether the host has opened the port.