I'm writing a host driver that has to send a lot of data from the network to a vendor-specific full-speed device.
My device enumerates, and I can do bulk IN transactions with DMA.
I've been reading up on the existing bugs in usbhostenum.c, and I've patched it for non-DMA use. Its working OK for that.
Whats not working is DMA mode for output.
Here's my Pipe config code:
// Output Pipe for sending data. DFUInfo.ui32BulkOutPipe = USBHCDPipeAlloc(0, USBHCD_PIPE_BULK_OUT_DMA,psDevice,DFUPipeCallback); // Configure the pipe for use with endpoint 4. if ( DFUInfo.ui32BulkOutPipe != 0 ) { int ret = USBHCDPipeConfig(DFUInfo.ui32BulkOutPipe, 64, // uint32_t ui32MaxPayload - Observed in descriptors. 0, // uint32_t ui32Interval 4 // uint32_t ui32TargetEndpoint ); // Make sure it worked... if ( ret != 0 ) { USBHCDPipeFree(DFUInfo.ui32BulkOutPipe); DFUInfo.ui32BulkOutPipe = -1; } }
What I'm seeing is that short writes (32 bytes) never send data onto the bus. Longer writes get stuck in the while(1) loop inside USBHCDPipeWrite() while it 'Waits for a status change" - this makes sense, because the signs are that the DMA write never happens.
The docs for
USBHCDPipeSchedule() say that its for IN transactions, but the code says that it also handles OUT. Is that the right way to go here?