FX3 generate varying duty PWM of 120Hz

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KeWa_2323766
Level 4
Level 4
25 sign-ins First solution authored 25 replies posted

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?

pastedImage_0.png

Thank you in advance.

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth

View solution in original post

0 Likes
3 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth
0 Likes

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,

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth
0 Likes