Question
Virtual Com Port for STM32F103XC
Posted on April 07, 2014 at 12:44
Hi Guys,
I Am trying to port VCP Example Project found in STM32_USB-FS-Device_Lib_V4.0.0 on STM32F103XE Eval kit. Pin Description : PA12------USBDP-------Pulled up by 1.5K Resistor. PA11------USBDM PA10------USART1_RX PA9--------USART1_TX So depending on same I modified as belowvoid Set_System(void)
{ GPIO_InitTypeDef GPIO_InitStructure; /*Set PA11,12 as IN - USB_DM,DP*/ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11 | GPIO_Pin_12; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; //GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOA, &GPIO_InitStructure); /*SET PA11,12 for USB: USB_DM,DP*/ // GPIO_PinAFConfig(GPIOA, GPIO_PinSource11, GPIO_AF_14); // GPIO_PinAFConfig(GPIOA, GPIO_PinSource12, GPIO_AF_14); } As GPIO_PinAFConfig is obsolete in latest standard peripheral library ( STM32F10x_StdPeriph_Lib_V3.5.0 ) so how can I set Pin11 and Pin12 as DM\DP ? Is there any substitute or how to configure same ?Regards,
Omji Mishra #usb-stm32
