1 Reply Latest reply on Aug 1, 2011 7:29 AM by anandsrinivasana_

    FX3 Timer

      Hello,

         

      I clock the FX3 with 19,2 MHz and using the slfifosync-example.

         

      I integrated a Timer:

         

      #define TIMER_TICKS     1

         

      uint32_t nInitialTicks = TIMER_TICKS;
          uint32_t nRescheduleTicks = TIMER_TICKS;
          uint32_t nTimerOption = CYU3P_AUTO_ACTIVATE;
          status = CyU3PTimerCreate(&pTimer1,TimerFunc1,nExpirationInput,
              nInitialTicks,nRescheduleTicks,nTimerOption);

         

      The expiration_function toggles a pin.

         

      void TimerFunc1(uint32_t nParam)
      {
         nTestPin =~ nTestPin;
         CyU3PGpioSetValue(GPIO_Tbl[nPinNum-1],nTestPin );
      }

         

      With TIMER_TICKS==1 (fasted value),  i get a toggle speed of 1msec on the pin.

         

      How can i set this timer faster?

         

      Best regards

         

      g.

        • 1. Re: FX3 Timer

          The timer you're trying to use is the OS timer. 1ms is the minimum you can achieve with it.

             

          FX3 does have a PWM with which you can achieve higher frequencies. The support for this hasn't been provided in the SDK yet. We'll be adding this support in future release. Will update the forum once it is done.

             

          Regards,

             

          Anand