CyU3PDeviceGPIOOverride() API

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

cross mob
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

I have override UART_RTS pin as GPIO by calling CyU3PDeviceGPIOOverride() API.

which api i need to use to make it this pin as output pin?

if i use this pin as output,can i use uart communication with only uart_tx and uart_rx pin parlally?

let me know

regards,

geetha.

0 Likes
1 Solution

The API  CyU3PDeviceGpioOverride allows you to use a GPIO pin without calling CyU3PDeviceConfigureIOMatrix.

After CyU3PDeviceGpioOverride, you need to do the following actions.

    status = CyU3PDeviceGpioOverride (22, CyTrue);

    if (status != 0)

    {

        CyU3PDebugPrint (4, "CyU3PDeviceGpioOverride failed, error code = %d\n",

        status);

    }

    /* Configure GPIO 22 as output; Used as Reset for Sensor */

    gpioConfig.outValue = CyTrue;

    gpioConfig.inputEn = CyFalse;

    gpioConfig.driveLowEn = CyTrue;

    gpioConfig.driveHighEn = CyTrue;

    gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;

    status = CyU3PGpioSetSimpleConfig(22, &gpioConfig);

    if (status != CY_U3P_SUCCESS)

    {

        CyU3PDebugPrint (4, "CyU3PGpioSetSimpleConfig failed, error code = %d\n",

        status);

    }

The code above configure GPIO 22 as output

View solution in original post

3 Replies
YangyangC_06
Employee
Employee
750 replies posted 500 replies posted 250 replies posted

Hi geetha,

Do you invoke CyU3PDeviceGpioOverride or CyU3PDeviceOverride?

hello,

its CyU3PDeviceGpioOverride() API

regards,

geetha.

0 Likes

The API  CyU3PDeviceGpioOverride allows you to use a GPIO pin without calling CyU3PDeviceConfigureIOMatrix.

After CyU3PDeviceGpioOverride, you need to do the following actions.

    status = CyU3PDeviceGpioOverride (22, CyTrue);

    if (status != 0)

    {

        CyU3PDebugPrint (4, "CyU3PDeviceGpioOverride failed, error code = %d\n",

        status);

    }

    /* Configure GPIO 22 as output; Used as Reset for Sensor */

    gpioConfig.outValue = CyTrue;

    gpioConfig.inputEn = CyFalse;

    gpioConfig.driveLowEn = CyTrue;

    gpioConfig.driveHighEn = CyTrue;

    gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;

    status = CyU3PGpioSetSimpleConfig(22, &gpioConfig);

    if (status != CY_U3P_SUCCESS)

    {

        CyU3PDebugPrint (4, "CyU3PGpioSetSimpleConfig failed, error code = %d\n",

        status);

    }

The code above configure GPIO 22 as output