I'm using CSL v3.04, USB mass storage class.
USB is configured as Hi-Speed, DMA mode via MSC_Open() call.
CSL MSC uses EP1 Bulk In and EP2 Bulk Out endpoints with the 512 bytes size each by default.
USB DMA and Queue Manager is initialized in the same manner as in "CSL_USB_MSC_dmaExample" project of "ccs_v5.0_examples".
If the Host requests read operation with the length of multiple sectors I configure CDMA to transfer packets of 1024 bytes size in the following way:
USB_confDmaTx(CSL_USB_EP1, phpDescrTx, CSL_USB_EP1_PACKET_SIZE_HS * usbTxSectorsNumber ,usbDataBuffer, FALSE);
where:
#pragma DATA_SECTION(usbDataBuffer, ".buffer_in_sram") #pragma DATA_ALIGN(usbDataBuffer, 32); Uint16 usbDataBuffer[16][SECTOR_SIZE / 2]; #pragma DATA_SECTION(hpDescrTable, ".buffer_in_sram") #pragma DATA_ALIGN(hpDescrTable, 32); CSL_UsbHostPktDescr hpDescrTable[32]; CSL_UsbHostPktDescr *phpDescrTx = &hpDescrTable[0]; Uint16 usbTxSectorsNumber = 2;
As described in TMS320C5535 specification CDMA is responsible for processing input data (Packet and Buffer descriptors) and transfer data with EndpointFifoSize transactions. So in my case it is supposed to divide the packet to 2 USB transactions of 512 bytes size.
This is what I see using USB analyzer:
I marked green the previous respond where the host requested 512 bytes and the transaction was Ok. But the next request was multiple-sectors and C5535 sent USB transaction with 1024 bytes length!
I also tried to pass 2048 and 4096 bytes Packets to CPPI DMA but they also didn't work. Here is what I saw for 2048 bytes packets in USB analyzer:
In debugger I see that interrupt is generated after the transfer is complete and operation looks like successful.
I would appreciate any help.
Thanks,
Denis