How to make STM32H7 HAL USB driver OS compatible
Hello,
Various CubeMX generated files related to USB, such as "usbh_conf.c" and even "stm32h7xx_ll_usb.c", are littered with HAL_Delay() waiting up to hundreds of milliseconds and therefore halting threaded application execution. Every time I switch USB keys (STM32 is MSC host), everything freezes for up to 200-300 ms.
I'd like to ask if it is me, who is doing something wrong, because I cannot wrap my head around how can something like this make it into official firmware and stay there for so long. Also, how can I replace it with for example osDelay() and keep the changes after project regeneration. I don't want to change HAL_Delay() to use osDelay(), as it is used for some delays in initialisation before scheduler takes over and it generally seems like bad idea.
