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

USBH_LL_GetLastXferSize returns 0.

pauleffect90 opened this issue · comments

Hi. Lemme start by saying "thank you", for posting this great example. I've used it to succesfully open a webcam.
However, on USBH_VIDEO_InputStream
volatile uint32_t rxlen = USBH_LL_GetLastXferSize(phost, VIDEO_Handle->camera.Pipe);//Return the last transfered packet size. always returns 0.
After reading your articles (those linked by you - thank god for google translate), I understood that this might be caused by the usb FIFO size. I changed the value up to 256, however I can't seem to get any data. Always rxlen 0.
I'm trying to get 640x480 frames (fps does not matter), and the endpoint im using is 1022 bytes long.
PS: I'm not trying to send the frames over to the PC or store them or whatever. Just getting the packets would be perfect. Any kind of help would be greatly appreciated!

Hello.
Are you sure that your camera could work in Full Speed mode?
Sometimes is is possible to switch USB of the PC in BIOS to FS - so you can try to check that camera is working in FS mode.

Yes. I hooked it up to a rpi zero (fs usb only) and it works.
I started with this check, after checking out your linked article.

I'm sorry, I don't have any ideas about that problem now.

Ok, thank you anyway. If I find out what's wrong, I'll paste it here.