@AMIR-F-O
The USBHProcess function is empty, it can cause problems. The USBHProcess function is responsible for handling the USB Host stack's state machine and processing USB events. If this function is not implemented correctly, the USB Host stack will not function properly, leading to issues such as the inability to detect or communicate with USB devices.
I think to ensure proper USB Host functionality, the USBHProcess function must call USBH_Process periodically. This allows the USB Host stack to handle events and manage device communication effectively.
The function should look something like this:
static void USBHProcess(void const * argument)
{
/* USER CODE BEGIN USBHProcess */
while (1)
{
// Process USB Host state machine
USBH_Process(&hUsbHostFS);
// Delay to allow other tasks to run
osDelay(1);
}
/* USER CODE END USBHProcess */
}