2 Replies Latest reply on Jan 21, 2016 9:55 AM by nia.fong_1534961

    FX3 SPI error CY_U3P_ERROR_MUTEX_FAILURE

    nia.fong_1534961

      I am triggering SPI register reads via GPIO34 but get a CY_U3P_ERROR_MUTEX_FAILURE when

         

      CyFxSpiTransfer() -> CyU3PSpiTransmitWords() calls CyU3PSpiGetLock().  I am using the CyFxUsbSpiRegMode example as a template but controlling the SPI SSN with GPIO34. 

         

      If I manually call CyFxSpiTransfer() the spi read works fine. 

         

      SpiConfig:

         

          spiConfig.isLsbFirst = CyFalse;
          spiConfig.cpol       = CyTrue;
          spiConfig.ssnPol     = CyFalse;
          spiConfig.cpha       = CyFalse;
          spiConfig.leadTime   = CY_U3P_SPI_SSN_LAG_LEAD_ONE_HALF_CLK;
          spiConfig.lagTime    = CY_U3P_SPI_SSN_LAG_LEAD_HALF_CLK;
          spiConfig.ssnCtrl    = CY_U3P_SPI_SSN_CTRL_HW_EACH_WORD;
          spiConfig.clock      = 20000000; // set clock to 20MHz //16-20MHz
          spiConfig.wordLen    = 32; // set word length to 32 bits

         

      Who else uses glSpiLock?