Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The discovery project can not go into USBH_VIDEO_Process() #5

Open
liuzhijun23 opened this issue May 19, 2021 · 3 comments
Open

The discovery project can not go into USBH_VIDEO_Process() #5

liuzhijun23 opened this issue May 19, 2021 · 3 comments

Comments

@liuzhijun23
Copy link

liuzhijun23 commented May 19, 2021

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);
}
}

@liuzhijun23
Copy link
Author

This is the watch window when run in the iar:
image

@iliasam
Copy link
Owner

iliasam commented May 19, 2021

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.

@liuzhijun23
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants