2017-06-29 08:39 PM
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
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
#usb-host-hs #usb #stm32f72017-06-30 01:44 AM
Hi
godzilathakur@gmail.com
,However, I need to configure HS over FS for an application.
Could you please clarify what do you mean exactly? Are you intending to configure the USB 2.0 high-speed/full-speed
device/host/OTG controller in FS mode?Khouloud.
2017-06-30 10:38 AM
Hi Khouloud,
My CDC application has typically ran on STM32F4 in HS over FS configuration. e.g. for STM32F439, I would configure USB FS PHY in HS mode. This is allowed by ST HAL libraries. On F746ZG however, when I try to do the same by using configuration as I mentioned above, I am unable to get SETUP and ENUMERATION interrupts.
I am trying to get an answer as to whether STM32F746ZG can in fact emulate HS over FS.
- Sean
2017-07-04 03:11 AM
Hi
thakur.sushant
,The STM32F746 and the STM32F439 devices embeds a:
I assume that, for your application, you want to use the second controller in FS mode. Thus, you should use PB14 and PB15 pins.
You may refer to
,table12, to have a complete idea about the alternate functions mapping on the STM32F746 devices.GPIO_InitStruct.Alternate = GPIO_AF12_OTG_HS_FS;
Khouloud.
2017-07-18 07:08 PM
I could bring up CDC class over FS. It appears, FS over HS does not quite work well with STM32F7