hi iam doing usb otg in stm32 f107 ,i had a reference code with me which is working good , iam able to do all USB operations properly wit that code ,but when am trying to understand the code USB DM,DP,USB_ID ,V-BUS are not defined in pin configuration.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-01-22 10:12 PM
void USB_OTG_BSP_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
/* Select USBCLK source */
RCC_OTGFSCLKConfig(RCC_OTGFSCLKSource_PLLVCO_Div3);
/* Enable the USB clock */
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_OTG_FS, ENABLE) ;
RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOC| RCC_APB2Periph_GPIOB| RCC_APB2Periph_GPIOA, ENABLE);
#ifdef SOF_OUTPUT_ENABLED
/* To enable SOF pulse out on PAD */
/* Configure SOF Pin */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init( GPIOA, &GPIO_InitStructure);
#endif
}
is it possible to use a peripheral without configuring the GPIO pins assigned to it ?
Labels:
- Labels:
-
STM32F1 Series
-
USB
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
