cancel
Showing results for 
Search instead for 
Did you mean: 

USBH_IsocReceiveData never returns any data.

NMetz
Associate

I'm writing a UVC driver for a STM32F205 and I have the probe/commit working as I am getting the max/min settings from the camera and the cameras streaming light comes on when I set the video streaming interface to the desired one. The only problem I have now is that calling USBH_IsocReceiveData seems to setup the transfer correctly, but after it's called the HC_IN ISR never gets run. I've used the patch detailed in https://community.st.com/s/question/0D50X00009XkdyKSAR/bug-in-usb-host-library-isochronous-data-receive , but since the ISR is never called in the first place it didnt help much.

Is there any way to tell if my camera isn't streaming data or if it's and issue with the library? I'll attach my probe/commit code and the loop that I'm trying to use to get the camera data.

Probe/Commit code: https://pastebin.com/sTtnQiF8

Main Loop: https://pastebin.com/fjxiUHFi

1 REPLY 1
YKish.259
Associate

I met the similar problem but mine was solved.

That was caused by FIFO size. The maximum size of USBH FS is limited to 0x100 as mentioned in the reference manual and the actual value is set in "stm32f4xx_ll_usb.c" and the default size is 0x80.

The way I solve the problem is

1.Change the FIFO size to 0x100 (You can edit the stme2f4xx_II_usb.c )

2.Select endpoint smaller than the FIFO size.

​3.Open a pipe with the size smaller than FIFO size by calling USBH_OpenPipe

4.Call USBH_IsocReceiveData with the size smaller than FIFO

5.Probe the packet reception by channel's state by HAL_HCD_HC_GetState

Your problem might not same as mine, but for information for someone.