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.

Starterware - Reg. DMA issue for both Bulk Device and Mass storage device

Other Parts Discussed in Thread: AM3352

Hi Everyone,

We started working on "usb_dev_bulk" example from "starterware 2_0_1_1 version" and created a composite device by adding Mass storage device driver to access SD card in a board which uses AM3352 sitara processor. 

The following are the issues that we came across

1) The Mass storage access is always put in DMA mode as specified in the example. So far, when we set the USB bulk device endpoints to be operated in DMA mode , we got errors whenever Mass storage event happens. The ARM hangs when servicing commands for mass storage driver, when the DMA for bulk device is enabled by using "enableCoreTx\RxDMA" function. But without DMA being set for bulk storage, we are able to use it. But for our application we require a very good throughput for both Rx and Tx and so we have to use DMA for bulk storage class.

2) The throughput that we have achieved so far is 17Mbps and 8Mbps for Tx and Rx endpoint through DMA mode using bulk device class driver. For Tx we have been able to set GRNDIS option but for Rx we had to stick with Transparent itself. I would like to know what is the general through that can be achieved for Tx and Rx using Bulk device driver in DMA.

Please do share your experience and thoughts on the above two points, which possibly will help me to solve them.

Thanks In Advance

Kandhasamy

  • Hi Kandhasamy,

     First issue

    You don't seem checking the cause for the interrupt (whether it was bulk or MSC ) and then calling the dmarRxCompletion for the other endpoint (bulk rx).

    The reason for this is that the example code that StarterWare provides uses only one example and hence in the interrupt handler StarterWare checks whether any action (rx or tx) is pending ( in the pend registers) and then act on it .

    Actions from You

     

    1. You seem to have pushed many free BDs into the rx submit Q of the Bulk channel. BDs are pushed or popped from the CPPI dma by writing to the Q_n_D registers where n is the queue number. First experiment would be to push BDs into the queue and pop them .This would ensure that there are enough BDs in the Q when the RX packet comes. Refer section 16.11 of the TRM further details. You may also use the count register to check whether there are any BDs in the Q.
    2. Check what interrupts are configured and whether they are coming properly. Please check by adding prints in the handler whether it is being visited as many number of times.

    Please refer StarterWare USB reference page for queries regarding throughput.