1 Reply Latest reply on Mar 11, 2013 12:05 AM by rama.sai.krishna.vakkantula

    Is there any chance to refresh DMA channel or Bulk-In endpoint  Automatically

    @qq.com.7

      hardware condition:cyusb3014,fpga for send data.

         

      firmware condition:AN65974 from cypress Website linked ”http://www.cypress.com/?rID=51581

         

      opereation:cyusb3014  connected   fpga with slavefifo,the fpga send Data Constantly,then I open the Streamer software and  Streamer will get data from cyusb3014,but sometimes later ,the stream can not get data anymore .I examine the ep 0x81 state and DMA channel state,but they all normal. then i write code to reset the ep and DMA channel.

         

      as soon as the streamer get data normal, i send the command to reset the ep and DMA channel,the stream will can not get Data immediately, same as the err talked above, and later i will can not work anymore. but if i reset the ep and DMA channel without let streamer get data,then the streamer can get data normally.

        • 1. Re: Is there any chance to refresh DMA channel or Bulk-In endpoint  Automatically
          rama.sai.krishna.vakkantula

          Hi,

             

          You can try the following thing.

             

          Check if there is some PIB error during the time whenever streamer gets stuck or unable to read data from FX3.

             

          If there is a PIB error then you can reset the DMA channel and EP there.

             

          You can check the PIB error as follows:

             

          Register a PIB callback as shown below.

             

          CyU3PPibRegisterCallback (CyFxAppPibCallback, CYU3P_PIB_INTR_ERROR);

             

          Define the function CyFxAppPibCallback as follows (You can modify this function as per your application requirement):

             

          static void CyFxAppPibCallback (
                  CyU3PPibIntrType cbType,
                  uint16_t cbArg)
          {
            

             

          if(cbType==CYU3P_PIB_INTR_ERROR)

             

          {

             

              switch (CYU3P_GET_PIB_ERROR_TYPE(cbArg))

             

              {

             

                  case CYU3P_PIB_ERR_THR0_WR_OVERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR0_WR_OVERRUN");

             

                  break;

             

                  case CYU3P_PIB_ERR_THR1_WR_OVERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR1_WR_OVERRUN");

             

                  break;

             

                  case CYU3P_PIB_ERR_THR2_WR_OVERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR2_WR_OVERRUN");

             

                  break;

             

                  case CYU3P_PIB_ERR_THR3_WR_OVERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR3_WR_OVERRUN");

             

                  break;

             

           

             

                  case CYU3P_PIB_ERR_THR0_RD_UNDERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR0_RD_UNDERRUN");

             

                  break;

             

                  case CYU3P_PIB_ERR_THR1_RD_UNDERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR1_RD_UNDERRUN");

             

                  break;

             

                  case CYU3P_PIB_ERR_THR2_RD_UNDERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR2_RD_UNDERRUN");

             

                  break;

             

                  case CYU3P_PIB_ERR_THR3_RD_UNDERRUN:

             

                  CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR3_RD_UNDERRUN");

             

                  break;

             

           

             

                  default:

             

                  CyU3PDebugPrint (4, "No Error :%d\n ",CYU3P_GET_PIB_ERROR_TYPE(cbArg));

             

                      break;

             

              }

             

          }

             

           
          }