iliasam / STM32_HOST_UVC_Camera

Example of connecting USB Web camera to STM32F4 USB HOST

Home Page:http://we.easyelectronics.ru/STM32/zahvat-izobrazheniya-s-usb-kamery-pri-pomoschi-stm32.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The discovery project can not go into USBH_VIDEO_Process()

liuzhijun23 opened this issue · comments

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:
image

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.