Hi,I am implementing the USB video class for host on a RZ/A2M MCU, starting from the MSC host sample code. I have finished the device configuration part, and I must now implement the isochronous request to retrieve video data.I would like to use endpoints with multiple transactions per microframe, but I am not sure that the r_usbh0 basic driver handles it.I noticed that the driver function R_USBH0_HstdSetPipe sets the maximum packet size without fully parsing the wMaxPacketSize field of the endpoint descriptor.Indeed, the 5 highest bits do not describe the packet size but the number of transactions per microframe. If I set the right MPS in the st_usbh0_pipe_t structure, which can reach up to 3072 bytes, will the USB driver handle it ?I am also wondering how asynchronous requests work with this driver. It is not described in the driver documentation and the sample codes do not use them. The official USB 2.0 and UVC documentations did not help me either.When I use a buffer length of 3060 bytes in the request structure st_usbh0_utr_t, I get two different results from the EHCI : sometimes USBH0_DATA_ERR, and nothing was written in the buffer, and sometimes USBH0_DATA_READING, which indicates a successful request I believe, but only the 12 header bytes are written to zeroes. I do not know if the problem comes from the camera that does not accept my request, or a wrong use of the USB driver.I noticed that asking for more than 3072 bytes makes the response callback never trigger.I suppose that I cannot just queue a big empty buffer, large enough to hold an entire video frame ? I presume the buffer is limited to the maximum theoretical packet size, 3072 bytes ?Do I need to fill the buffer ? I noticed my PC does it. Here is a truncated isochronous request my PC sent :
Frame 537: 1575 bytes on wire (12600 bits), 1575 bytes captured (12600 bits) on interface \\.\USBPcap2, id 0 USB URB [Source: host] [Destination: 2.7.1] USBPcap pseudoheader length: 1575 IRP ID: 0xffffd4825b3c78a0 IRP USBD_STATUS: USBD_STATUS_SUCCESS (0x00000000) URB Function: URB_FUNCTION_ISOCH_TRANSFER (0x000a) IRP information: 0x00, Direction: FDO -> PDO URB bus id: 2 Device address: 7 Endpoint: 0x81, Direction: IN URB transfer type: URB_ISOCHRONOUS (0x00) Packet Data Length: 0 [Response in: 553] Isochronous transfer start frame: 0 Isochronous transfer number of packets: 128 Isochronous transfer error count: 0 USB isochronous packet ISO Data offset: 0x00000000 ISO Data length: 0x00000000 (irrelevant) ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant) USB isochronous packet ISO Data offset: 0x00000bf4 ISO Data length: 0x00000000 (irrelevant) ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant) ... USB isochronous packet ISO Data offset: 0x0005ee0c ISO Data length: 0x00000000 (irrelevant) ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)