2018-08-05 07:51 AM
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?
2018-08-05 08:31 AM
Doesn't it use the OTG_HS pins?
2018-08-05 09:04 AM
Enable debug prints from the USB modules and see where enumeration stops or fails.
--pa
2018-08-05 01:55 PM
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.