2017-05-08 03:40 AM
Hi
I think it is a bug...
Problem:
Isochronous data Receive from USB Device with ST USB Host library.
- > no example or projects in internet
So i tried to get data from USB Webcam.
But i didn't get an USBH_URB_DONE event or other flag
i added following lines in function:
static void HCD_HC_IN_IRQHandler (HCD_HandleTypeDef *hhcd, uint8_t chnum)
if ((hhcd->hc[chnum].ep_type == EP_TYPE_CTRL)|| (hhcd->hc[chnum].ep_type == EP_TYPE_BULK)) { __HAL_HCD_UNMASK_HALT_HC_INT(chnum); USB_HC_Halt(hhcd->Instance, chnum); __HAL_HCD_CLEAR_HC_INT(chnum, USB_OTG_HCINT_NAK); } else if((hhcd->hc[chnum].ep_type == EP_TYPE_INTR)|| (hhcd->hc[chnum].ep_type == EP_TYPE_ISOC )) { USBx_HC(chnum)->HCCHAR |= USB_OTG_HCCHAR_ODDFRM; hhcd->hc[chnum].urb_state = URB_DONE; HAL_HCD_HC_NotifyURBChange_Callback(hhcd, chnum, hhcd->hc[chnum].urb_state); } hhcd->hc[chnum].toggle_in ^= 1; }
line (hhcd->hc[chnum].ep_type == EP_TYPE_ISOC )) added to catch URB EVENT
example for receive isochronous data :
case VIDEO_STREAM_START:
USBH_IsocReceiveData( phost , framebuffer , pVideo->EpVideoStream.wMaxPacketSize, pVideo->EpVideoStream.bPipe ); pVideo->StreamState = VIDEO_STREAM_PLAY; osMessagePut ( phost->os_event, USBH_URB_EVENT , 0); break;case VIDEO_STREAM_PLAY:
if((USBH_LL_GetURBState(phost , pVideo->EpVideoStream.bPipe) == USBH_URB_DONE)&& ((phost->Timer-pVideo->EpVideoStream.wTimer) >= pVideo->EpVideoStream.bInterval)){pVideo->EpVideoStream.wTimer = phost->Timer;
uint32_t rxlen = USBH_LL_GetLastXferSize (phost, pVideo->EpVideoStream.bPipe ) ;
if( rxlen ){} USBH_IsocReceiveData( phost , framebuffer , pVideo->EpVideoStream.wMaxPacketSize, pVideo->EpVideoStream.bPipe );
}
osMessagePut ( phost->os_event, USBH_URB_EVENT , 0); break;2017-05-08 09:31 AM
Hi
Frerichs.Dirk
,Please note that this issue is reported internally and it is under review.
I will keep you informed about the taken actions/explanation if needed.
Imen
2017-05-24 06:42 PM
Please help me !
I am developing a uvc driver in kit stm32f4 Discovery .
I fixed source code ST USB Host library same you but I still don't receiver Isochronous data.
I sure webcam is streaming.
Please send your source and usb lib you used to my email
mailto:linhit1.2@gmail.com
Thanks you so much.
2018-03-07 03:56 PM
Imen,
We are also trying to use the STM32F4 as a host for a USB web cam. I have been struggling to figure this out and it looks like the HAL doesn't support isochronous data as input.
Has there been any movement on this issue?
Is there any plan to implement this and provide an example?
Thanks,
Kevin