3 Replies Latest reply on Aug 3, 2018 2:59 AM by yyca

    CyU3PDeviceGPIOOverride() API

    Geethanjali_3054931

      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.

        • 1. Re: CyU3PDeviceOverride() API
          yyca

          Hi geetha,

           

          Do you invoke CyU3PDeviceGpioOverride or CyU3PDeviceOverride?

          1 of 1 people found this helpful
          • 2. Re: CyU3PDeviceOverride() API
            Geethanjali_3054931

            hello,

            its CyU3PDeviceGpioOverride() API

            regards,

            geetha.

            • 3. Re: CyU3PDeviceOverride() API
              yyca

              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

              1 of 1 people found this helpful