6 Replies Latest reply on Nov 28, 2011 10:42 PM by monika.ragers

    transfer data failed (isochronous mode)

    sean.huang.2
              I want to transfer data from EP2 to peripheral, EP2 is configured as isochronous mode. I use that cyconsle iso transfer to send data to cypress,however, cyconsole shows me "Isoc OUT Transfer & Isoc OUT failed". I do not know why it transfer failed. Setting is shown as following:   
         
      ----------------------------------------------------------------------------------------   
      ;; Endpoint Descriptor   
      db DSCR_ENDPNT_LEN ;; Descriptor length   
      db DSCR_ENDPNT ;; Descriptor type   
      db 02H ;; Endpoint number, and direction   
      db ET_ISO ;; Endpoint type   
      db 00H ;; Maximum packet size (LSB)   
      db 02H ;; Maximum packet size (MSB)   
      db 01H ;; Polling interval   
      -------------------------------------------------------------------------------------------   
      TD_init():   
      // set the CPU clock to 48MHz   
      CPUCS = (((CPUCS & ~bmCLKSPD) | bmCLKSPD1)) ;   
      SYNCDELAY;   
         
      EP2CFG = 0x98;   
      SYNCDELAY;   
      EP4CFG = 0x00; // EP4 not valid   
      SYNCDELAY;   
      EP6CFG = 0x00;//0xEA; // EP6IN, bulk, size 512, 4x buffered   
      SYNCDELAY;   
      EP8CFG = 0x00; // EP8 not valid   
      SYNCDELAY;   
         
      FIFORESET = 0x80; // set NAKALL bit to NAK all transfers from host   
      SYNCDELAY;   
      FIFORESET = 0x02; // reset EP2 FIFO   
      SYNCDELAY;   
      FIFORESET = 0x02; // reset EP2 FIFO   
      SYNCDELAY;   
      FIFORESET = 0x02; // reset EP2 FIFO   
      SYNCDELAY;   
      FIFORESET = 0x02; // reset EP2 FIFO   
      SYNCDELAY;   
      FIFORESET = 0x00; // clear NAKALL bit to resume normal operation   
      SYNCDELAY;   
         
      EP2FIFOCFG = 0x00; // allow core to see zero to one transition of auto out bit   
      SYNCDELAY;   
      EP2FIFOCFG = 0x10; // auto out mode, disable PKTEND zero length send, word ops   
      SYNCDELAY;   
         
      GpifInit (); // initialize GPIF registers   
         
      SYNCDELAY;   
         
        • 1. Re: transfer data failed (isochronous mode)
          ali.masoudi

          Hello

             

           

             

          What are the settings of CyConsole for ISO transfer ?

          • 2. Re: transfer data failed (isochronous mode)
            monika.ragers

            I have the same problem setting for cyConsole is its default setting (has it any effect?)

               

            I am not sure why cypress does not provide simple example for such premitive tests!
             

            • 3. Re: transfer data failed (isochronous mode)
              gaya

               Hello,

                 

               

                 

              For an Isochronous transfer, the length has to be a multiple of 8 times the packet size. For example, if the packet size is set to 128, then the length has to be minimum 1024 Bytes . It can also be 2048, 3072, 4096. Note that, in CyConsole, the maximum transfer length is 4096 Bytes.

                 

              Please check this out and see if this solves the problem.

                 

               

                 

              Regards,

                 

              Gayathri

              • 4. Re: transfer data failed (isochronous mode)
                monika.ragers

                dear Gayathri

                   

                setting packet size  to 512 and lenght to 4096 solves the fail problem.  

                   

                but to reach maximum throughput I think we should put packet size to 1024 :

                   

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                   

                db 00H ;; Maximum packet size (LSB)
                db 14H ;; Maximum packet size (MSB)  
                db 01H ;; Polling interval                          
                 

                   

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                   

                and  and in this case

                   

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                   

                EP2CFG = 0x98;

                   

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                   

                how can it be done?

                • 5. Re: transfer data failed (isochronous mode)
                  gaya

                   Hello,

                     

                   

                     

                  I believe for meeting your throughput condition, you want packet size = 1024Bytes, no: of packets/uF = 3 (from descriptor value that you have assigned: 

                     

                  db 00H ;; Maximum packet size (LSB) 

                     

                  db 14H ;; Maximum packet size (MSB)  

                     

                  Also, EP2ISOINPKTS should be assigned 0x03 for ensuring 3 packets/uF. Now that you have kept it for 3packets/uF, now your packet size/uF = 3 * 1024 = 3072. So, now the length that you need to specify in CyConcole should be 8 times this value, i.e.       8 * 3072 = 24576 Bytes. Sorry for the wrong information about the maximum transfer length in CyConsole to be 4096 Bytes. That is for a differnt context, and not for Isochronous transfers.

                     

                   

                     

                  Regards,

                     

                  Gayathri

                  • 6. Re: transfer data failed (isochronous mode)
                    monika.ragers

                    dear Gayathri

                       

                    thanks solved