STM32CubeMx IDE USB Virtual COM port code generation & implementation.
Hi all, I've been trying to use the virtual com port on the "STM32F4DISCOVERY" with no luck. My current IDE is STM32CubeIDE v1.3.1, STM32CubeMx v5.6.1, I'm also using firmware pack FW_F4 V1.25.0.
Ive started a brand new project, used the CubeIDE board selector to select the Discovery board (STM32f407). I've Configured USB_OTG_FS to 'Device_Only' mode, SOF off, VBUS on. I have changed the USB_DEVICE "middlewares?" to, FS IP = VCP. I have also installed the VCP com drivers (I'm in windows 10). I left everything else UN-touched (I also disabled the low speed external clock, I don't have one)
Once my project was gen-ed, I included "usbd_cdc_if.h". In the main while loop I added a 1sec delay, then CDC_Transmit_FS(buff, size). Everything compiled just fine.
The issue is, I'm not receiving anything over the VCP, I have the dev kit plugged in via the otg usb port (as well as the stlink usb port for uploading code). The VCP dose show up in device manager, however putty is unable to connect. After some time passes, the VCP Com device becomes unrecognized.
So I guess my question is, dose the gen-ed code for the VCP over USB need any additional modification? I suspect I might not be implementing it right. Any information anyone can provide would be really great.
I've also tried increasing the stack and heap sizes, this didn't fix anything. Dose "CDC_Control_FS" need anything additional? all of the switch cases are empty... The USB peripheral is kind of a new concept for me, and I'm getting kinda frustrated.
Any information is welcome, I also won't say no to a tutorial / guide.
