Replies: 1 comment 1 reply
-
This code works. It makes use of the embedded PHY of the MCU in full speed mode. 73, DB4PLE |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was looking through the USB host code to see if I could connect a keyboard, and the initialisation routine sets the USB for HS, high speed, 480 Mb/s, which I believe requires a PHY chip to work. Is there such a chip on the board?
Here is the code:-
`/**
*/
USBH_StatusTypeDef USBH_LL_Init (USBH_HandleTypeDef phost)
{
/ Init USB_IP /
if (phost->id == HOST_HS) { /// CAN UHSDR BE HS 480 MbS CAPABLE!?!?
/ Link The driver to the stack */
hhcd_USB_OTG_HS.pData = phost;
phost->pData = &hhcd_USB_OTG_HS;
hhcd_USB_OTG_HS.Instance = USB_OTG_HS;
hhcd_USB_OTG_HS.Init.Host_channels = 12;
hhcd_USB_OTG_HS.Init.speed = HCD_SPEED_FULL;
hhcd_USB_OTG_HS.Init.dma_enable = DISABLE;
hhcd_USB_OTG_HS.Init.phy_itface = USB_OTG_EMBEDDED_PHY;
hhcd_USB_OTG_HS.Init.Sof_enable = DISABLE;
hhcd_USB_OTG_HS.Init.low_power_enable = DISABLE;
hhcd_USB_OTG_HS.Init.vbus_sensing_enable = DISABLE;
hhcd_USB_OTG_HS.Init.use_external_vbus = DISABLE;
if (HAL_HCD_Init(&hhcd_USB_OTG_HS) != HAL_OK)
{
Error_Handler();
}
USBH_LL_SetTimer (phost, HAL_HCD_GetCurrentFrame(&hhcd_USB_OTG_HS));
}
return USBH_OK;
}`
Beta Was this translation helpful? Give feedback.
All reactions