AnsweredAssumed Answered

STM32F7 HS over FS USB

Question asked by sean thakur on Jun 30, 2017
Latest reply on Jul 19, 2017 by sean thakur

Board: Nucleo F746ZG

I configured USB for CDC Class over FS, and I was able to enumerate as a tty.usb serial device.

However, I need to configure HS over FS for an application. On STM32F4, I have been able to do so for the CDC class. Is there a limitation with F7 that does not allow for configuring HS over FS phy?

 

I referred to this doc, and HS over FS is not explicitly mentioned

http://www.st.com/content/ccc/resource/training/technical/product_training/group0/de/d3/cd/3d/72/0c/4d/4e/STM32F7_Periph… 

 

However following alternate function for GPIO as defined in HAL libraries:

GPIO_AF12_OTG_HS_FS 

 

 

I have configured GPIOs PA11 and PA12 as DP, DM

 

Following Config does not enumerate:

    /**USB_OTG_HS GPIO Configuration

    PA12     ------> USB_OTG_HS_DP

    PA11     ------> USB_OTG_HS_DM

    */

    GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_11;

    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;

    GPIO_InitStruct.Alternate = GPIO_AF12_OTG_HS_FS;

    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

    /* Peripheral clock enable */

    __HAL_RCC_USB_OTG_HS_CLK_ENABLE();

    /* Peripheral interrupt init */

    HAL_NVIC_SetPriority(OTG_HS_IRQn, 6, 0);

    HAL_NVIC_EnableIRQ(OTG_HS_IRQn);

 

Following Code enumerates:

/**USB_OTG_FS GPIO Configuration

    PA12     ------> USB_OTG_HS_DP

    PA11     ------> USB_OTG_HS_DM

    */

    GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_11;

    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;

    GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;

    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

 

    /* Peripheral clock enable */

    __HAL_RCC_USB_OTG_FS_CLK_ENABLE();

    /* Peripheral interrupt init */

    HAL_NVIC_SetPriority(OTG_FS_IRQn, 6, 0);

    HAL_NVIC_EnableIRQ(OTG_FS_IRQn);

USB clock is off of PLLQ at 48 MHz

 

Please help clarify if HS over FS is supported in STM32F7

Outcomes