1 2 Previous Next 20 Replies Latest reply on Nov 4, 2014 3:37 AM by himam_31

    USBFS example project DMA Auto Mode

      This example project can be used to calculate the maximum throughput using the Streamer Application.


      It also details as comments, the use and significance of every function in the firmware. So one can use it to build and understand the concepts of USB APIs. 


      The C# and C++ based applications are also archieved and attached.


      It can be used to test and check the throughput.

        • 1. Re: USBFS example project DMA Auto Mode
                  Very interesting test-bench but   
          Regrettable to say, Attach was not success.   
          Please use IE, FireFox or Safari.   
          Anyway, I got 860KB/s by my board.   
          • 2. Re: USBFS example project DMA Auto Mode

            Some people are having trouble using Chrome for posts.




            Regards, Dana.

            • 3. Re: USBFS example project DMA Auto Mode

              Ya, You are right. I was using Chrome.
              Here is the attachment.


              If the applications are not working, use the Cypress SuiteUSB  installed applications.



              • 4. Re: USBFS example project DMA Auto Mode



                Im trying to run the program but i always get problem installing the driver (which need to be installed automatically).


                Im getting in Computer Management under "Other devices"->"Auto Mode" device which says:


                "The drivers for this device are not installed. (Code 28)

                There is no driver selected for the device information set or element.

                To find a driver for this device, click Update Driver."




                How can i solve it and run it?




                Thank you.

                • 5. Re: USBFS example project DMA Auto Mode
                          You need driver information file (*.inf) for your USB device   
                  I was looking the zip file but not find it   
                  What is your USB project?   
                  If USB-UART design then INF file would made automatically.   
                  If real USB-FS design, e,g Bulk transfer   
                  so, you have to made INF file by yourself.   
                  • 6. Re: USBFS example project DMA Auto Mode

                    I was trying to run your project USB-FS no UART..


                    1. How do i make my own .inf file?


                    2. If i want to use 1024bytes per transfer, how do i configure my Endpoint Transer Type? as BULK limit to 64Bytes..




                    Thank you :)

                    • 7. Re: USBFS example project DMA Auto Mode
                              At first, Download this USB suits   
                      [ http://www.cypress.com/?rID=34870 ]   
                      There are Driver set and origin INF file   
                      You would be better modify it.   
                      How to make it, that was written in some PDF about CyUSB.dll in this suits.   
                      How to do large packet transfer more than 64byte,   
                      That is use sof flag (start of frame) and repeat use of Bulk end point.   
                      • 8. Re: USBFS example project DMA Auto Mode

                        Ok, and creating a driver will map the USBFS as COM port?


                        One more thing, I tried to run this example with USBUART component with DMA Automatic Memory Management


                        and two EP's with Max Packet size of 64Bytes, Transfer Type: BULK, and Interval 10ms (default).


                        And when the for loop is running endlessly, i do see the output on the pc terminal,


                        but when i try to run the DMA transaction only once, i do not see any output on the pc terminal.


                        My code is exactly like the example code with a minor change that i limit the output command: USBUART_1_LoadInEP(IN_EP,NULL,MAX_BUF);


                        to run only once and not as long as:


                        USBUART_1_GetEPState(IN_EP)== USBUART_1_IN_BUFFER_EMPTY




                        Thank you for your help.

                        • 9. Re: USBFS example project DMA Auto Mode
                                  You say that is inconsistent   
                          To mapping the USBFS to COM port that is USBUART itself   
                          You owe to use USBUART   
                          Advantage of bulk transfer is ...   
                          User no needs select the COM port so user program can connect the USB automatically.   
                          And bulk transfer can use 6 another end point and can use it for various features   
                          Nonetheless, of cause, total physical tranfer rate is same as USBUART.   
                          And, What is this? NULL?   
                          You would doing transfer from NULL pointer   
                          No data should transfered.   
                          • 10. Re: USBFS example project DMA Auto Mode

                            Thank you PSoC73 but i think i need to explain myself better...


                            The NULL called after the first intialization occured and the IN_EP is linked to the buffer:




                            then, the   USBUART_1_LoadInEP(IN_EP,NULL,MAX_BUF); is called in order to send the data to the pc through the DMA


                            and its happening only when this line called forever and NOT when it called once.




                            My Code look like this:


                            uint8 eflag = 0;


                                    /* PSOC to PC */
                                    {    /* An IN transaction occurred and more data can be loaded */
                                    }else if (USBUART_1_GetEPState(IN_EP)== USBUART_1_IN_BUFFER_FULL)
                                    {    /* The IN endpoint is loaded and the mode is set to ACK IN */


                                    /* PC to PSOC */
                                    if(USBUART_1_GetEPState(OUT_EP)== USBUART_1_OUT_BUFFER_EMPTY)
                                    {    /* The OUT endpoint is set to ACK OUT and is waiting for data */

                                    }else if ( (USBUART_1_GetEPState(OUT_EP)==USBUART_1_OUT_BUFFER_FULL) && (eflag < 1))
                                    {    /* An OUT transaction has occurred and data can be read */






                            Thank you again...

                            • 11. Re: USBFS example project DMA Auto Mode
                                      I see,   
                              When DMA transfer that use NULL pointer sending after first packet.   
                              I should know that, this time   
                              Anyway, Are you forget turn on the DMA loop flag?   
                              • 12. Re: USBFS example project DMA Auto Mode

                                 Hey PSoC73,


                                I wasnt aware about this DMA Loop Flag, does it meen that if it turned on, each call to USBUART_1_LoadInEP(IN_EP,NULL,MAX_BUF); function will force the DMA to send the data to the host?


                                and how do i turn this flag on anyways?




                                Thank you so much!

                                • 13. Re: USBFS example project DMA Auto Mode
                                          Yes, While loop flag is ON, DMA will continue repeat transfer to the USB,   
                                  To turn on is once in configulation of DMA,   
                                  For example DMA wizard do it.   
                                  I think so, however i didn't do this DMA-USB model actually.   
                                  Thank you.   
                                  • 14. Re: USBFS example project DMA Auto Mode



                                    I finally managed to install the usb driver (using the "CyUSBSerial_driver_v3.13.0.20_WHQL_CERTIFIED" driver from cypress) but when i run the C# and C++ applications i dont see any of the ENDPOINTS in the list.


                                    Device manager screenshot is attached.




                                    Thank you for your help!

                                    1 2 Previous Next