1 Reply Latest reply on Nov 16, 2014 7:09 AM by user_1377889

    Circular DMA buffers for Usb communication in PSoC 5LP

    manuj.sharma

       PSoC 5LP ARchitecture TRM mentions about circular DMA mode in which multiple TDs are chanined together and used in a circular manner. Is there any way to use to use circular DMA mode during usb communication? The application note says that DMA is configured with the first call to USBFS ReadOutEP or LoadInEP. So how do we specify multiple buffers which can be filled up by DMA in circular manner? Application note AN56377 gives an example of Auto DMA transfer with only a single buffer. Is there any example of using multiple DMA buffers in circular manner for USB communication?

         

      Regards,

         

      Manuj

        • 1. Re: Circular DMA buffers for Usb communication in PSoC 5LP
          user_1377889

          I do not have an example, but the mechanism is quite easy to implement.

             

          Each TD contains a pointer to the next TD to execute when finished.

             

          So TD[0] points to TD[1] which points to TD[2]. which points to TD[0] again and now the circle is made.

             

          Look at the description for

             

          CyDmaTdSetConfiguration(uint8 tdHandle, uint16 transferCount, uint8 nextTd,uint8 configuration)

             

          where the next TDs are specified.

             

           

             

          Bob