7 Replies Latest reply on Jun 20, 2018 12:38 PM by user_457566

    Simple GPIO max speed

    ievgenrai_2610591

      Hi, I want to drive simple GPIO with max speed.

       

      I have initialized the deviceinit and GPIO clock  as:

       

      /* Initialize the device */

       

      clockConfig.setSysClk400 = CyTrue;

      clockConfig.cpuClkDiv     = 2;

      clockConfig.dmaClkDiv     = 2;

      clockConfig.mmioClkDiv    = 2;

      clockConfig.useStandbyClk = CyFalse;

      clockConfig.clkSrc       = CY_U3P_SYS_CLK;

       

      /* Initialize the GPIO block */

       

      gpioClock.fastClkDiv = 2;

      gpioClock.slowClkDiv = 2;

      gpioClock.simpleDiv = CY_U3P_GPIO_SIMPLE_DIV_BY_2;

      gpioClock.clkSrc     = CY_U3P_SYS_CLK;

      gpioClock.halfDiv   = 0;

       

      Then I tried to create pulses:

       

      /* Initialize test pin */

       

       

      newGpioConfig.outValue = CyFalse;

      newGpioConfig.driveLowEn = CyTrue;

      newGpioConfig.driveHighEn = CyTrue;

      newGpioConfig.inputEn = CyFalse;

      newGpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;

       

      apiRetStatus = CyU3PGpioSetSimpleConfig(TEST_30, &newGpioConfig);

       

      /* loop */

       

      while(1){

           CyU3PGpioSetValue (TEST_30, CyFalse);

           CyU3PGpioSetValue (TEST_30, CyTrue);

      }

       

      I see that speed is too slow. Swithing frequency is very low. Frequency is about 288 kHz.

       

      t.jpg

       

          Why does it work with low speed? How can I get a high speed?