2016-12-21 07:35 AM
When I generate a project with USB CDC Device Class and FreeRTOS, enumeration fails because the clock to the USB peripheral is not enabled before calling MX_USB_DEVICE_Init(). If I insert the code as follows
void StartDefaultTask(void const * argument)
{ /* init code for LWIP */ MX_LWIP_Init(); __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); <----- INSERT THIS LINE /* init code for USB_DEVICE */ MX_USB_DEVICE_Init();/* USER CODE BEGIN 5 */
/* Infinite loop */ for(;;) { osDelay(1); } /* USER CODE END 5 */ }in the Default Task it works like a charm. Please consider fixing that as it took me quite some time to figure out what was wrong.
#stm32cube-bug #stm32-usb-cdc-cubemx #stm32f407 #freertos-stm32cube2016-12-22 07:49 AM
Hi
Rudolf.Markus
,I will check this problem with our MXteam & come back to you.Sorry for the inconvenience it may bring.
-Nesrine-