So I found this arduino sketch seems it’s able to read pwm frequency, but I don’t know how reliable it is.
If you want try it out, it’s here
Here are some values with RC_SPEED at 50Hz
pulsetime(us) = 1098.50, pd_us(us) = 19987.50, pulseFreq(Hz) = 50.03
pulsetime(us) = 1098.00, pd_us(us) = 19987.50, pulseFreq(Hz) = 50.03
pulsetime(us) = 1098.00, pd_us(us) = 19987.50, pulseFreq(Hz) = 50.03
pulsetime(us) = 1098.50, pd_us(us) = 19987.00, pulseFreq(Hz) = 50.03
pulsetime(us) = 1098.00, pd_us(us) = 19988.00, pulseFreq(Hz) = 50.03
pulsetime(us) = 1098.50, pd_us(us) = 19987.00, pulseFreq(Hz) = 50.03
pulsetime(us) = 1098.00, pd_us(us) = 19987.50, pulseFreq(Hz) = 50.03
pulsetime(us) = 1100.00, pd_us(us) = 19987.00, pulseFreq(Hz) = 50.03
pulsetime(us) = 1098.50, pd_us(us) = 19987.50, pulseFreq(Hz) = 50.03
Next I change RC_SPEED to 100Hz and restart arducopter.
pulsetime(us) = 1098.50, pd_us(us) = 5696.50, pulseFreq(Hz) = 175.55
pulsetime(us) = 1098.50, pd_us(us) = 7755.00, pulseFreq(Hz) = 128.95
pulsetime(us) = 1098.00, pd_us(us) = 8329.00, pulseFreq(Hz) = 120.06
pulsetime(us) = 1098.50, pd_us(us) = 6659.50, pulseFreq(Hz) = 150.16
pulsetime(us) = 1091.50, pd_us(us) = 5095.00, pulseFreq(Hz) = 196.27
pulsetime(us) = 1098.50, pd_us(us) = 9987.50, pulseFreq(Hz) = 100.13
pulsetime(us) = 1604.00, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.00, pd_us(us) = 8275.50, pulseFreq(Hz) = 120.84
pulsetime(us) = 1098.50, pd_us(us) = 5304.00, pulseFreq(Hz) = 188.54
pulsetime(us) = 1098.00, pd_us(us) = 6705.00, pulseFreq(Hz) = 149.14
pulsetime(us) = 1098.50, pd_us(us) = 9395.00, pulseFreq(Hz) = 106.44
pulsetime(us) = 1098.00, pd_us(us) = 9324.00, pulseFreq(Hz) = 107.25
pulsetime(us) = 1098.50, pd_us(us) = 3398.50, pulseFreq(Hz) = 294.25
So it seems I far away from 100Hz.
If I stop arducopter then I get proper frequency reading:
pulsetime(us) = 1098.50, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
pulsetime(us) = 1099.50, pd_us(us) = 9994.50, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.50, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.50, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.00, pd_us(us) = 9994.50, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.50, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.50, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.00, pd_us(us) = 9994.50, pulseFreq(Hz) = 100.06
pulsetime(us) = 1094.00, pd_us(us) = 9998.50, pulseFreq(Hz) = 100.01
pulsetime(us) = 1098.50, pd_us(us) = 9989.50, pulseFreq(Hz) = 100.11
pulsetime(us) = 1098.00, pd_us(us) = 9994.50, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.50, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
pulsetime(us) = 1098.50, pd_us(us) = 9994.00, pulseFreq(Hz) = 100.06
I can repeat this for many different frequency values I set in RC_SPEED. It seems that when arducopter is running, the PWM signal is not good.