STM32_HOST_UVC_Camera
STM32_HOST_UVC_Camera copied to clipboard
The discovery project can not go into USBH_VIDEO_Process()
I connect the usb camera(which can work ok on my computer) to my STM32F407 borad,and run the discorery project,I find that the program can not go into USBH_VIDEO_Process(&hUsbHostFS) in USB_HOST_fast_class_call(),I find that the hUsbHostFS.gState = HOST_ABORT_STATE.I don't know the reason.Can you help me? void USB_HOST_fast_class_call(void) { if (hUsbHostFS.gState == HOST_CLASS) { USBH_VIDEO_Process(&hUsbHostFS); } }
This is the watch window when run in the iar:
Your "bInterfaceClass" value is 0x09. According to https://www.usb.org/defined-class-codes this is hub class. Are you connecting camera by usb-hub?
In my project USBH_MAX_NUM_SUPPORTED_CLASS value is set to 1: https://github.com/iliasam/STM32_HOST_UVC_Camera/blob/master/HAL_source/stm32F4_discovery_project/Inc/usbh_conf.h You can try to increase that value but I'm not sure if that will help.
I find the reason now.The project set the usb mode to full speed.But my usb camera worked in high speed mode.So the programe can not find the video interface.I would bought a full speed usb camera and test in another day.