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.

TMS320F28388D: Is it possible to use uDMA in conjunction with USB in the Connectivity Manager (CM) processor?

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi,

I've got a project where I have the CM processor is responsible for USB communication. The CM application uses the USB Library provided by C2000Ware to make the controlCARD into a USB Bulk Device.

I've been content with using USBBufferWrite and USBBufferRead for sending and receiving data, but now I need way to transfer data over USB much more quickly. The use of buffers have an computation overhead for each transfer that makes them unsuitable for transferring large amounts of data in a time critical manner. The usb_ex8_device_bulk_throughput_cm shows how to rapidly transfer data at speeds of ~7.6 Mbps by writing the next packet in the transmit callback function (called after the previous packet has been transmitted).

However, even though this achieves the desired speeds, I was wondering if I could reduce the CPU involvement by delegating part of the transfer task to the uDMA.

My research into the available documentation, examples, and library source code haven't yielded much knowledge in using the uDMA with the USB Library (and in fact discourages such use). The USB Library documentation did not provide code snippets regarding uDMA, nor were there any example projects showing how to use uDMA with the USB Library. The USB Library source code had several functions pertain to DMA having empty (or virtually empty for functions that simply return 0) function bodies. Lastly, the errata stated that "USB DMA Event Triggers" are not supported, which suggests that any DMA usage with USB is to be avoided.

But if there really is a way to use the uDMA feature of the CM with the USB library, please show me how in a reply.

Sincerely,

Howard Li

  • Okay after further research, only the USB trigger signals cannot be used with uDMA. I can still use the DMA to put data into the appropriate endpoint FIFO and then call USBEndpointDataSend() in the uDMA interrupt handler to have that data sent to the host. Is that correct?

  • Hi,

    Yes, you can do that but please note that if you have assigned USB access from DMA then CM will not have access to it. We have PALLOCATE bit which need to be configured to switch access between CPU1 and CM.

    Regards,

    Vivek Singh

  • My apologies if there was any confusion in my previous post regarding whether I was referring to the C28x DMA or the ARM uDMA when I said "DMA".

    I only intend to use the CM uDMA with the USB peripheral.

  • Hi Howard,

     Okay after further research, only the USB trigger signals cannot be used with uDMA.

    We do have USB trigger signals connected to uDMA. Please refer "Table 49-1. μDMA Channel Assignment Mapping" in device TRM. We had some issue with C28x DMA accessing USB hence suggestion was to not use trigger but that should not be the case with CM uDMA.

    On examples, I need to check with SW team and get back to you. 

    Regards,

    Vivek Singh