2024-03-27 04:29 AM
I am working on OTG FS application on stm32f769 discovery board, as per the it's schematic for OTG_FS VBUS power supply will be taken care by External Phy(see below image).
So as per that I configure the STMCUBE IDE, and i disabled the VBUS_Sensing also. and started the debug process. I noticed that it is getting failed. Inside this USBH_Process in 1st switch case i.e. HOST_IDLE case there is one if condition, that is getting failed.
USBH_StatusTypeDef USBH_Process(USBH_HandleTypeDef *phost)
{
__IO USBH_StatusTypeDef status = USBH_FAIL;
uint8_t idx = 0U;
printf("inside usbh process\n");
/* check for Host pending port disconnect event */
if (phost->device.is_disconnected == 1U)
{
phost->gState = HOST_DEV_DISCONNECTED;
}
switch (phost->gState)
{
case HOST_IDLE :
if ((phost->device.is_connected) != 0U)
{
printf("USB Device Connected");
/* Wait for 200 ms after connection */
phost->gState = HOST_DEV_WAIT_FOR_ATTACHMENT;
USBH_Delay(200U);
(void)USBH_LL_ResetPort(phost);
/* Make sure to start with Default address */
phost->device.address = USBH_ADDRESS_DEFAULT;
phost->Timeout = 0U;
#if (USBH_USE_OS == 1U)
phost->os_msg = (uint32_t)USBH_PORT_EVENT;
#if (osCMSIS < 0x20000U)
(void)osMessagePut(phost->os_event, phost->os_msg, 0U);
#else
(void)osMessageQueuePut(phost->os_event, &phost->os_msg, 0U, 0U);
#endif
#endif
}
break;
Is it related to VBUS ? even i tried by enabling Vbus_Sensing and kept the PA9 gpio which enabled automatically after enabling VBUS sensing still same issue. Can anybody tell me anything am missing here.
Regards,
Shikamaru
Solved! Go to Solution.
2024-04-03 06:30 AM
Hello @Shikamaru
You should connect the jumper usbhs in CN3. It is necessary for ULPI interface
In datasheet section Driving External Vbus, CPEN is dedicated to controlling the Vbus supply when configured as an A-Device (host).
It is mentioned in the user manual, 32F769IDISCOVERY Discovery board must be powered by an external power supply when using the host function.
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.
2024-04-01 07:40 AM
Hello @Shikamaru
@Shikamaru wrote:
I am working on OTG FS application on stm32f769 discovery board, as per the it's schematic for OTG_FS VBUS power supply will be taken care by External Phy(see below image).
USB power switch is connected to VBUS and provides power to CN15 when stm32f769 is Host. However, VBUS is powered by another USB host when F769 is device.
Would you please share the state of jumper usbhs in CN3?
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.
2024-04-01 11:15 AM
Jumper on CN3 is connected to stlink.
2024-04-03 06:30 AM
Hello @Shikamaru
You should connect the jumper usbhs in CN3. It is necessary for ULPI interface
In datasheet section Driving External Vbus, CPEN is dedicated to controlling the Vbus supply when configured as an A-Device (host).
It is mentioned in the user manual, 32F769IDISCOVERY Discovery board must be powered by an external power supply when using the host function.
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.
2024-04-04 12:22 AM