cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

gean_3054931
Contributor II

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
YangyangC_06
Employee

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

Hi geetha,

Do you invoke CyU3PDeviceGpioOverride or CyU3PDeviceOverride?

gean_3054931
Contributor II

hello,

its CyU3PDeviceGpioOverride() API

regards,

geetha.

0 Likes
YangyangC_06
Employee

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