What is the Servo library PWM frequency?

I am trying to build a multicopter with the photon and was wondering about the PWM update frequency of the particle firmware.

Exactly this question was asked in the forum last November, Changing servo library PWM frequency?.
The question was not realy answered, the final answer was from mdma: Particle Senior Embedded Engineer Nov '15
"To modify the Servo library, please submit a pull request with the code changes needed."

I don’t have the knowledge to send a pull request but I am interested in the answer, so my questions are:

  • What is the PWM update frequency of the particle firmware.

  • Is it 50 Hz and defined in “pinmap_hal.h”: #define SERVO_TIM_PWM_FREQ 50//50Hz

  • Can this value be increased? If yes, up to which value?

    I tried to increase it to 400 (period 2.5ms) and 200 (period 5 ms) both times it didn’t work. A period of 2.5 ms might be to short but 5 ms could work where high time is at most 2 ms. I am using dys XM10A esc which support according to the data sheet a refresh rate of the throttle signal up to 500Hz.

I think that thread predates the introduction of the enhanced analogWrite() fuctions which also allow to set the PWM periode

And AFAIK the update can be preset any time and will come into effect with each counter-reset on the respective PWM timer (which wasn’t true before either due to a meanwhile fixed bug), so I’d think that this should be doable with `analogWrite()´, but the contributed servo library doesn’t make use of the new version.