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.

USB HOST mode using CPPI



Hi,

1)  In section 2.2.1 of sprz284b, we cannot use generic RNDIS mode, but how about RNDIS. Or neither of them can be used for mass storage devices. TRANSPARENT mode works for mass storage device, but the size of DMA packet under this mode is less than the usb packet, which is not optimized for mass storage device. So my question is Which DMA mode is proper for mass storage device.

 

2) I know the differences between generic RNDIS and normal RNDIS. But how I handle it during the USB transaction, is there any difference between them during the usb transaction, or they are identical (I know for generice RNDIS, we should setup the RNDIS EP size register). E.g. do I need to setup a zero length HPD for RNDIS mode if the previous TX is exactly multiple of max usb pkt size.

 

3) can you explain RXHPCRB[n] RXHPCRA[n] RXGCR[n] TXGCR[n] further. The description on the datasheet is really unreadable.

 

4)It would be really helpful if the datasheet would give the configurations of the register for my scenario: usb host mode, talking to usb flash drive using BULK ONLY protocol via EP TX1 and EP RX1.

 

Thanks,

Sheng

 

  • sheng

    1) The mass storage protocol does not allow the short packet. Hence the RNDIS mode cannot be used. The best configuration of DMA for mass storage device is  a) Generic rndis mode for TX direction from device (IN token from host) b) Transparent mode for Rx direction from device (OUT token from host). You can queue mulitple BD to rx-dma for best performance.

    2) In RNDIS mode the TX-DMA automatically transmits ZLP when the packet length is mulitiple of endpoint max packet size. The GRNDIS mode do not transmit ZLP, it can receive upto EP-SIZE data bytes or terminates if short packet is received.

    Regards

    Ravi B

     

     

  • Thanks for your response.

    1) For RX, if I want to receive 1024 bytes, I can submit both two BDs with a 512 byte bufffer to the queue 0 before the RX transfer, and then set  USB0_HOST_RXCSR_REQPKT bit in CSR1. The hardware starts to RX transfer. I will get one interrupt for the 1st 512byte completion, and another interrupt for the 2nd 512byte. Or I need submit one BD by one BD, which is, I submit 1 BD to the queue 0, set  USB0_HOST_RXCSR_REQPKT, wait for the interrupt, and in this interrupt I submit the 2nd BD to queue 0, set USB0_HOST_RXCSR_REQPKT again, and receive another interrupt.

     

    2) Here "transmits ZLP" means transmitting to the USB2.0 core in OMAP or transmitting to the usb device. If this is for transmitting to the usb device, does that means the usb device have to support this ZLP. If the usb device does not support this ZLP, we can not use this mode, right?

     

    Thanks again!

    Sheng

     

     

     

  • Sheng

    For host mode operation, you can use the Generic RNDIS mode, where set the epsize register to number bytes to be received (say 1024) and select auto request enable with ALL BUT EOP mode. Then construct only one BD with buffer length equal to length of data to be received. Once the REQPKT is set the due to auto req mode, the reqpkt is set for all the subsequeunt packets till last packet is received and finally only one interrupt is received.

    The ZLP is usb protocol generally used in cdc/rndis networking mode of application (or some custom application). If your application is making sure that buffer is never be multiple of maximum packet size then you need not use RNDIS mode. Generally in linux cdc/rndis gadget driver will increment the length of packet by 1 if the packet length is mulitple of maximum endpoint packet size.

    Regards

    Ravi B

     

  • Hi,

    Can anybody tell me that in CPPI DMA of other processors such as DM8148 or 8146 Why do we have CPPI Mem1 Base Address Register when the Location of data buffers is already contained in the Descriptors we define?