3 Replies Latest reply on May 6, 2019 10:29 PM by HemanthR_06

    FX3 generate varying duty PWM of 120Hz

    KeWa_2323766

      We have a FX3 application that needs 120Hz pulses with varying duty cycles. For example, from 11/12 duty and 6/12 duty as the plot shown below. We may have other varying duty pulse train requirement like, 90%, 75%, 50%, 25%, 10%.  Is it feasible for FX3?

       

       

       

      Thank you in advance.

        • 1. Re: FX3 generate varying duty PWM of 120Hz
          HemanthR_06

          Hi,

           

          Can you please let me know if you have tried ComplexGpio example in FX3 SDK (If not, please refer the same)?

          And what do you mean by 11/12 duty and 6/12 duty? (Do you mean 91% ON period and 50% ON period respectively)

           

          Regards,

          Hemanth

          • 2. Re: FX3 generate varying duty PWM of 120Hz
            KeWa_2323766

            Hermanth,

            I did use the complexGPIO to generate 120Hz signal with fixed duty cycle, i.e. the duration of high level and low level does not change. Your understanding of duty is right.

            I can't generate a 120Hz signal with different duty cycle, especially, two neighboring pulses have different duty cycle. One pulse generated, stop the GPIO, configure the duty cycle, enable the GPIO to generate the next one with new duty cycle value, stop the GPIO againm configure duty cycle,...... The pulse does not look right.

             

            Thanks,

            • 3. Re: FX3 generate varying duty PWM of 120Hz
              HemanthR_06

              Hi,

               

              I hope you are using CyU3PGpioComplexUpdate() API to update the duty cycle.

              If the output by using this is not as expected, then you can try updating the threshold and period of the GPIO directly by register access (For doing the same you can refer to Section 10.23 of FX3_TRM and CyU3PGpioComplexUpdate() implementation in the SDK source)

               

              Regards,

              Hemanth