Why STM32H743 USB FS doesn't work if FreeRTOS TICKLESS_IDLE enabled?
- April 22, 2019
- 3 replies
- 2378 views
I'm having a problem to make USB CDC device driver work with FreeRTOS. If FreeRTOS is configured without TICKLESS_IDLE mode, USB CDC works fine. However, once TICKLESS_IDLE is enabled (or WFI is executed), I no longer able to finish USB enumeration process. It looks I can't get EP0 interrupt which indicates arrival of incoming SETUP packet. Why?
My code is generated by attached CubeMX configs, then main loop is modified to make it sure that FreeRTOS idle task runs.
void StartDefaultTask(void const * argument)
{
/* init code for USB_DEVICE */
MX_USB_DEVICE_Init();
/* USER CODE BEGIN 5 */
HAL_PWREx_EnableUSBVoltageDetector();
/* Infinite loop */
for(;;)
{
osDelay(10);
}
/* USER CODE END 5 */
}I have checked RCC_AHB1LPENR settings, but USBOTG clocks are enabled.
I also tested similar configuration on STM32F767 and confirmed that USB CDC works with TICKLESS_IDLE mode enabled. That is, I imagine there is a some settings missing specific for H7, but I can't find it.
Does anyone have similar experience?
Toshiharu
