2011-06-19 09:57 AM
Hi:
I have problem with this function - it just doesn't work if you want to send some data (> 0 bytes). The setup packet is sent and ACK is received but when data packet is sent no response. See example below:
uint8_t buf[1] = { val };
setup.b.bmRequestType = 0x40;
setup.b.bRequest = 0x04;
setup.b.wValue = reg;
setup.b.wIndex = 0;
setup.b.wLength = 1;
while (USBH_CtlSendSetup (&USB_OTG_FS_dev,
&setup.d8[0],
USBH_Machine.Control.hc_num_out) != USBH_OK);
while (HCD_GetURB_State (&USB_OTG_FS_dev) != URB_DONE);
while (USBH_CtlSendData (&USB_OTG_FS_dev,
buf,
sizeof(buf)/sizeof(buf[0]),
USBH_Machine.Control.hc_num_out) != USBH_OK);
2011-06-20 09:46 AM
It seems the functionality was not tested properly...
2011-06-21 07:57 AM
Here is more info - if I turn the optimization on the I pass the point where data the data is send so I complete the whole transfer. But when I try to initiate the same transfer again I fail. Is there a way to control the time value (I could not see a way)?
2011-06-21 10:02 AM
Apperantly nobody ever tested this with GCC... Very unprofessional.
2015-10-20 01:32 AM
Hello!!!
I
have
the same problem.I'm trying to send a command CDC_SEND_ENCAPSULATED_COMMAND with payload 24 bytes REMOTE_NDIS_INITIALIZE_MSG.
But
more
than
8 bytes
are not transmitted.