2 Replies Latest reply on Nov 20, 2017 11:05 PM by decai.wang_2529456

    Can gpio46 be configured as complex gpio?

    decai.wang_2529456

      Dear Sir,

       

      I want to configure GPIO46 as PWM output, but error code = 68 is return , it means CY_U3P_ERROR_NOT_CONFIGURED .

       

      But when gpio46 is override and configured by simple gpio, no error return.

       

      Can Gpio46 be configured as complex gpio?

       

      David

       

       

       

      status = CyU3PDeviceGpioOverride (46, CyTrue);  // configuring GPIO 46 LED_PWM

      gpioConfig1.outValue = CyFalse;

      gpioConfig1.inputEn = CyFalse;

      gpioConfig1.driveLowEn = CyTrue;

      gpioConfig1.driveHighEn = CyTrue;

      gpioConfig1.pinMode = CY_U3P_GPIO_MODE_PWM;

      gpioConfig1.intrMode = CY_U3P_GPIO_NO_INTR;

      gpioConfig1.timerMode = CY_U3P_GPIO_TIMER_HIGH_FREQ;

      gpioConfig1.timer = 0;

      gpioConfig1.period = CY_FX_PWM_PERIOD;

      gpioConfig1.threshold = CY_FX_PWM_25P_THRESHOLD;

      status = CyU3PGpioSetComplexConfig(46, &gpioConfig1);

      if (status != CY_U3P_SUCCESS)

      {

      CyU3PDebugPrint (4, "CyU3PGpioSetComplexConfig failed, error code = %d\n",status);

      CyCx3UvcAppErrorHandler(status);

      }