4 Replies Latest reply on May 10, 2017 10:57 PM by Madhu Lakshmipathy

    SOLVED: Error "CYU3P_PIB_ERR_THR0_DIRECTION" when slfifosync is 8 bits

    thierry.fischer

      Hello,

         

      I have modified the project example slfifosync in order to support 8b GPIF (it comes with support for 32 & 16, but not 8 ?!) as described after.

         

      My issue is that it works like a charm (communicate without errors with my FPGA board on all channels) when I compile for 32 or 16 bits but does not for 8bits and it keeps throwing "CYU3P_PIB_ERR_THR0_DIRECTION" errors when I try to transfer data from fpga to usb.

         

      The fpga bitstream  and host application are the same for all my 32/16/8 trials, only the firmware slightly differs. Does anyone experienced the same when gpif is 8b ?

         

      These are the modifications I did for supporting 8b in slfifosync example:

         

      cyfxslfifosync.h:

         
          /* 16/32 bit GPIF Configuration select */    
      /* Set CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT = 0 for 16 or 8 bit GPIF data bus.    
      * Set CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT = 1 for 32 bit GPIF data bus.    
      */    
           #define CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT (0)    
      /* 8/16 bit GPIF Configuration select */    
      /* Set CY_FX_SLFIFO_GPIF_8_16BIT_CONF_SELECT = 0 for  8 bit GPIF data bus.    
      * Set CY_FX_SLFIFO_GPIF_8_16BIT_CONF_SELECT = 1 for 16 bit GPIF data bus.    
      */    
           #define CY_FX_SLFIFO_GPIF_8_16BIT_CONF_SELECT (0)   
         

      cyfxgpif_syncsf.h:

         
          /* Summary    
         GPIF II configuration register values.    
      */    
      uint32_t Sync_Slave_Fifo_5Bit_CyFxGpifRegValue[]  = {    
          0x80000380,  /*  CY_U3P_PIB_GPIF_CONFIG */    
      #if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 0)    
      #if (CY_FX_SLFIFO_GPIF_8_16BIT_CONF_SELECT == 0)    
               0x00001003,  /*  CY_U3P_PIB_GPIF_BUS_CONFIG */    
      #else    
          0x000010A7,  /*  CY_U3P_PIB_GPIF_BUS_CONFIG */    
      #endif    
      #else    
          0x000010AC,  /*  CY_U3P_PIB_GPIF_BUS_CONFIG */    
      #endif   
         

      Thanks