cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX USB MSC code generation problem report

Muhammed Güler
Senior II

hello everyone

I'm working on a USB MSC application. Standalone works fine. When I create code with FreeRtos, the hal_delay () functions are left in the usbh_conf.c file. Replacing the hal_delay codes generated by cubemx with the following codes, there is no problem. I would be glad if you can make the necessary changes in the next firmware update.

 #if (USBH_USE_OS == 1)

  osDelay (Delay);

#else

  HAL_Delay (Delay);

#endif

older post

hello everyone

I'm trying to make a USB MSC application with stm32f407 standalone works fine. I haven't been able to run it with freertos yet, but I noticed that CubeMx created the USBH_Delay function called from within the operating system as follows.

void USBH_Delay (uint32_t Delay)

{

  HAL_Delay (Delay);

}

When I replace it with the code below, the freertos stopped freezing when I plug in usb

void USBH_Delay (uint32_t Delay)

{

#if (USBH_USE_OS == 1)

  osDelay (Delay);

#else

  HAL_Delay (Delay);

#endif

}

0 REPLIES 0