1 Reply Latest reply on Jul 1, 2011 6:48 AM by sangram.keshari.maharana

    CyU3PI2cSetConfig problem

    user_136061072

      Hello,

         

      I try to get the I2C interface working without DMA.

         

      My initialisation looks like following:

         

          CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
          CyU3PI2cConfig_t config;

          CyU3PDebugPrint (4, "CyU3PI2cInit...\r\n");
          status = CyU3PI2cInit();
          if(status != CY_U3P_SUCCESS){
              CyU3PDebugPrint (4, "CyU3PI2cInit Failed, Error Code = %x\r\n",status);
              return status;
          }

          config.bitRate = 100000;
          config.isDma = CyFalse;
          config.busTimeout = 0xFFFFFFFFU;
          config.dmaTimeout = 0xFFFF;

          status = CyU3PI2cSetConfig(&config, &IS_I2cIR);
          if(status != CY_U3P_SUCCESS)
          {
              CyU3PDebugPrint (4, "CyU3PI2cSetConfig Failed, Error Code = %x\r\n",status);
              return status;
          }

         

         CyU3PI2cSetConfig fails with errorcode CY_U3P_ERROR_BAD_ARGUMENT.

         

         When setting "config.isDma = CyTrue", CyU3PI2cSetConfig returns with CY_U3P_SUCCESS.

         

         What could be wrong?

         

         Best regards

         

         g.