2021-11-17 05:04 AM
Hello,
I am working on Nucleo-h745ziq board. The example provide in cubemx of Ux_Device_CDC_ACM accordingly I create the example for Nucleo-h745ziq board. The changes I make that instead of HS I select Fs mode because board support the FS mode and disable the MPU protection because it gives problem for CM4 core. When I connect two usb only STLINK Port recognize user USB port is not get updated. I share the setup things,
static void MX_USB_OTG_FS_PCD_Init(void)
{
/* USER CODE BEGIN USB_OTG_FS_Init 1 */
memset(&hpcd_USB_OTG_FS, 0x0, sizeof(PCD_HandleTypeDef));
/* USER CODE END USB_OTG_FS_Init 1 */
hpcd_USB_OTG_FS.Instance = USB_OTG_FS;
hpcd_USB_OTG_FS.Init.dev_endpoints = 9;
hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL;
hpcd_USB_OTG_FS.Init.dma_enable = DISABLE;
hpcd_USB_OTG_FS.Init.phy_itface = USB_OTG_EMBEDDED_PHY;
hpcd_USB_OTG_FS.Init.Sof_enable = DISABLE;
hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE;
hpcd_USB_OTG_FS.Init.lpm_enable = DISABLE;
hpcd_USB_OTG_FS.Init.battery_charging_enable = ENABLE;
hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE;
hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE;
if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK)
{
Error_Handler();
}
}
void MX_USB_Device_Init(void)
{
HAL_PWREx_EnableUSBVoltageDetector();
MX_USB_OTG_FS_PCD_Init();
HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_FS, 0x200);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 0, 0x10);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 2, 0x10);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 3, 0x20);
ux_dcd_stm32_initialize((ULONG)USB_OTG_FS, (ULONG)&hpcd_USB_OTG_FS);
HAL_PCD_Start(&hpcd_USB_OTG_FS);
}
Why the port is not get updated the Device driver? Can you help me. Because I am newly work on Azure Rtos I don't have much knowledge of it.
Solved! Go to Solution.
2021-11-22 10:40 AM
Have a look at the example "Ux_Device_HID_CDC_ACM" provided within the AZRTOS-H7 pack it is using the STM32H747-DK board similar to the one you are using.
regards
Haithem.
2021-11-22 10:40 AM
Have a look at the example "Ux_Device_HID_CDC_ACM" provided within the AZRTOS-H7 pack it is using the STM32H747-DK board similar to the one you are using.
regards
Haithem.