- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The second parameter in the CyU3PDeviceGpioOverride() API should be CyFalse for a complex GPIO.
Please try this: CyU3PDeviceGpioOverride (46, CyFalse);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The second parameter in the CyU3PDeviceGpioOverride() API should be CyFalse for a complex GPIO.
Please try this: CyU3PDeviceGpioOverride (46, CyFalse);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.