Can gpio46 be configured as complex gpio?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
dawa_2529456
Level 4
Level 4
5 sign-ins 5 solutions authored First solution authored

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);

}

0 Likes
1 Solution
ManaskantD_51
Employee
Employee
Welcome! 25 solutions authored 10 solutions authored

The second parameter in the CyU3PDeviceGpioOverride() API should be CyFalse for a complex GPIO.

Please try this: CyU3PDeviceGpioOverride (46, CyFalse);

View solution in original post

0 Likes
2 Replies
ManaskantD_51
Employee
Employee
Welcome! 25 solutions authored 10 solutions authored

The second parameter in the CyU3PDeviceGpioOverride() API should be CyFalse for a complex GPIO.

Please try this: CyU3PDeviceGpioOverride (46, CyFalse);

0 Likes

Thanks.

0 Likes