4 Replies Latest reply on Jan 10, 2013 7:49 AM by kalev.sildaru

    GPIF Pull-ups/Pull-downs

    jed.althouse

      Is it possible to use a pull-up or pull-down on a GPIO that is used by the GPIF?  If so, how do I go about implementing this?

        • 1. Re: GPIF Pull-ups/Pull-downs
          jed.althouse

          I am getting a configuration error from CyU3PDeviceConfigureIOMatrix() when any of the pins that are part of the GPIF are enabled for GPIO. In the Programmer's Manual it states that when a block of pins are allocated into a group (GPIF, UART, etc) then "unused pins may be overridden as GPIO" - the implication being that a pin can't be both.

          • 2. Re: GPIF Pull-ups/Pull-downs
            steve.magnani

            If you wanted to use GPIF pins as GPIO you would need to call CyU3PDeviceGpioOverride() for each pin before calling CyU3PPibInit() - and not include any of those pins in the call to CyU3PDeviceConfigureIOMatrix().

            But it sounds like what you want is to keep the pins as part of GPIF and merely change how they are driven. Correct?

            Steve


             

            • 3. Re: GPIF Pull-ups/Pull-downs
              jed.althouse

              Correct, I would like to keep the pins as part of the GPIF and still take advantage of the internal pull-up/pull-down capabilities.

                 

              Here is the answer I got from Cypress technical support:

                                                  
              The CyU3PDeviceGpioOverride() API should be used followed by the CyU3PGpioSetSimpleConfig() API to configure an I/O pin used by the GPIF.

              The CyU3PDeviceConfigureIOMatrix() API cannot access the pins which are allocated into a group.
              • 4. Re: GPIF Pull-ups/Pull-downs
                kalev.sildaru

                You can use CyU3PGpioSetIoMode for GPIF controlled pins as well.

                   

                Kalev