cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f429i-Disc1 USB-CDC PC won't see virtual com port. Any idea what to do?

R??zt
Associate

Hello, I have a STM32f429i-Disc1 board and trying to run a simple usb-cdc code. I've watched many videos on youtube and looked over many examples but I couldn't make it work. board won't appear as virtual com port on device tree. I downloaded stsw-stm32102 and installed vcp drivers. On CubeMX, I activated USB-OTG-FS, activated virtual communication device from middliware USB, configured clocks and then generated codes. On Keil in main.c, I'm inserting following codes to necessary lines.

/* USER CODE BEGIN Includes */
#include "usbd_cdc_if.h"
#include "string.h"
/* USER CODE END Includes */
.
.
  /* USER CODE BEGIN 1 */
	uint8_t Buff1[]="Hop \r\n\r\n";
  /* USER CODE END 1 */
.
.
CDC_Transmit_FS(Buff1, strlen((char *)Buff1));
HAL_Delay(2500);

Both USB (mini and micro) are connected, drivers are installed, codes are prepared as I mentioned but it is as if USB is not initializing and won't appear on pc. By the way, I tried keil examples and both USB-HID and winUSB examples are worked without problem.

So, any idea what am I missing?

3 REPLIES 3

Doesn't it use the OTG_HS pins?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

Enable debug prints from the USB modules and see where enumeration stops or fails.

--pa

R??zt
Associate

You are right @Community member​ micro usb uses "USB_OTG_HS/Internal Fs Phy" didn't check datasheet and worked over stm32f4-disc examples then I missed this. But I also needed to change heap size to 0x0000 0400, VCP didn't work properly otherwise. Now it is working without problem. Thanks for help.