cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID Host MX_USB_HOST_Process Call

Stanford
Associate II

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

1 REPLY 1
AScha.3
Chief II

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:

AScha3_0-1693238139809.png

 

If you feel a post has answered your question, please click "Accept as Solution".