This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C5535 USB Bulk In operation performs 1024 bytes transaction

Other Parts Discussed in Thread: TMS320C5535

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

  • Hi,

    Could you try with the attached patch file csl_usbAux.h - few issues related to bulk read transfers were fixed here .

    Let us know your observation.

    Regards

     Vasanth

    7853.csl_usbAux.h

     

  • Hi Vasanth,

    Thanks for update.

    I tried it and it didn't help.

    Actually I see only one change comparing to csl_v3.04.

    *pFifoAddr = *pwBuffer & 0xFF;

    It's relevant for non-DMA transfers with odd size and couldn't solve the problem with CDMA.

    Thanks,

    Denis

  • Hi Dennis,

      Thanks for the updated, Yes I wanted you to work with the latest file so shared the details.

      Will further look at the issue you are facing and get back to you. But had couple of  questions : What is the hardware platform you are using ? Were you able to reproduce the issue using TI hardware & software platform ?

      Pl let us know.

    Regards

     Vasanth

     

  • I'm using eZdsp USB Stick Development Kit, TMDX5535EZDSP.
    Software: Code Composer Studio Version 4.2.4.00033. It was provided with eZdsp package.
    CSL as I mentioned v3.04.

    For the basis of experiments I used ccs_v5.0_ examples, CSL_USB_MSC_dmaExample project.
    But because this project support only 512 bytes transfers via DMA I made some changes to support multiple-sector transfers. The changes mainly related to MSC level. I have also excluded DSP/BIOS from the project to remove OS overhead for performance reasons.

    Thanks,
    Denis