How do I create two synchronized PWM signals?

Hi everybody

I want to use both PWMs of the Jetson Nano development board, but in a synchronized manner, to control multiple cameras and LEDs. I try to start signals simultaneously, but it causes a random phase shift.

Is there any solution to doing that?

Thank you.

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

Hi, dear kayccc.
The issue is still open and I can not resolve it.
Thanks for your reply.

PWM pulses can be in same phase (configuring same period and duty width) but can’t assure to be in sync.
Even though SW programs enable bits simultaneously, there is HW latency to start generating the pulse. This can go till 255th pulse of the source clock. SW has no control over it.

Possible suggestion: If sw pwm using gpio bit banging can be used in your case. But this needs both the pwm configurations from same gpio block.

Ref: GPIO PWM driver

Hi, dear ShaneCCC

Special thanks for your reply.

As SW-generated pulses are not as reliable as HW ones, I prefer to use HW as much as possible.

As I see, there are two separate PWM pins in Jetson Nano developer kits that can be seen in /sys/kernel/debug/pwm :

platform/70110000.pwm, 1 PWM device
 pwm-0   (pwm-regulator       ): requested enabled period: 2500 ns duty: 0 ns polarity: normal

platform/7000a000.pwm, 4 PWM devices
 pwm-0   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-1   (pwm-regulator       ): requested period: 8000 ns duty: 1440 ns polarity: normal
 pwm-2   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-3   (pwm-fan             ): requested enabled period: 45334 ns duty: 0 ns polarity: normal 

Every main pwm pin is generated by a different platform. The first platform has 1 pwm and the second has 4 pwm devices. But the fan control pwm signal is generated by the second one (platform/7000a000.pwm) that is used to generate pwm-1 too. If it’s possible to use the fan pwm signal, is it possible to synchronize fan-pwm and pwm1 ?

@Trumany
Could you help to check if able to use pwm-fan by wire jump or any rework.

Thanks

@joe.smith
As my explain in early comment there’s no way to synchronize two PWM output.

Thanks

Thank you for your response.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.