Setting the output PWM frequency

Hello dear readers,

I’ve got a custom Y6-Copter which has got 6 esc32 controllers conntected to the 6 AUX-Ports. Those want an PWM frequency of 60 Hz. I used a scope to verify, that the current frequency of the PX4-ports is 50 Hz.

Because of that the ESC’s dont spin the motors at all, since they expect an higher frequency. Im working on this for severall days now and I wasnt able to find similar topics or any other helping articles during my research. I found an article which describes how to change this PWM values but its older and its done by using the cli-terminal, which isnt working in the newer firmware versions.

I tried a few older FW versions but most of them didnt work and those which worked only had very few options and no PWM application to change the frequency. There is also no parameter in the full parameter list (Im using MissionPlaner).

Is there another way to adjust the PWM frequency?

Greetings and Thx a lot for reading and maybe helping :slight_smile:

There’s a PWM_RATE parameter that was recently added, but that’s only MAIN.
You could either add similar support for AUX, or add an etc/extras.txt file on the sdcard with the commands to set the rates.

Hi, @dagar
I used version 1.8.2 and CUAVv5 for quad. I tested the PWM output using oscilloscope, I found that if PWM_RATE was set less than 400, the oscilloscope could detect the right frequency ,but if it was more than 400, such as 500, the oscilloscope detect the 400Hz frequency. But In the param list, it said that we could use less than 2000! How could I set the PWM_RATE right?
I tried to modify it the file ROMFS/px4fmu_common/init.d/rc.mc_defaults, it did not work either!