cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO STM32F767ZI: problems to enable USB OTG FS (Host)

FBerg.1
Associate III

I started a STM32 framework project here: https://github.com/FBergemann/STM32-FreeRTOS-Framework/tree/dev-usb-host-msd. And i am currently busy to set up logging to console and USB FS (as Host to USB stick). But i didn't manage to enable USB OTG FS. I think it's due to an error in enable VBUS. Because in https://github.com/FBergemann/STM32-FreeRTOS-Framework/blob/dev-usb-host-msd/USB_HOST/Target/usbh_conf.c there is

#79 GPIO_InitStruct.Pin = USB_VBUS_Pin;

#80 GPIO_InitStruct.Mode = GPIO_MODE_INPUT; /* wrong?! */

#81 GPIO_InitStruct.Pull = GPIO_NOPULL;

#82 HAL_GPIO_Init(USB_VBUS_GPIO_Port, &GPIO_InitStruct);

I followed instructions according http://evenlund.blogspot.com/2016/10/usb-storage-with-stm32f4-discovery-and_58.html

and https://www.youtube.com/watch?v=uIOb5sSFyUY.

Can you please tell me, what i am doing wrong here?

- thanks!

regards,

Frank

10 REPLIES 10
SofLit
ST Employee

Hello @FBerg.1​,

Unfortunately there is no .ioc file for F4, F7, H7 families .. and the examples/demo provided are developed directly with HAL. May be .ioc files will be available in the Cubes of new coming products.

There is no difference between STM32F769 & STM32F767 devices except the DSI interface which is available on F769.

For the boards, the main difference I think is the clock configuration. So I think you have to configure the board with periph initialization and then follow the example which I pointed out just for reference for USB config, then put your user code..

For the generated erroneous code with CubeMx I will escalate the subject internally, if there is an issue it will be fixed.

STM32

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.