2023-08-28 08:04 AM
I've setup my STM32L475 non-RTOS as a USB HID Host to interface with a barcode scanner. All works well if I call sdf MX_USB_HOST_Process in my main application loop with no delays. However, if MX_USB_HOST_Process is not called fast enough, characters are missed. How have others handled calling MX_USB_HOST_Process? (if I were using FreeRTOS, then this call could be made from a dedicated task). One person suggested using a low priority timer interrupt. However, I was wondering if there was another solution. thanks
2023-08-28 08:55 AM
i have the MX_USB_HOST_Process() at the end of main while-loop, is called about at 200us interval, when nothing else happens. but maybe also 120ms HAL-delay comes, for delay after keypress, no problem with USB.
i use usb-MSC host, connect to usb-stick, reading data for constant data rate at about 1.6 Mbit . the FAT data read is in interrupt , so no problem.
important is INT priority ... :)
usb is highest of other int , see: