user13749: I'm rebuilding a laser CNC machine and using LaserWeb4 as the control interface and GRBL 1.1 as the low-level interface to the stepper motors, limit switches and the laser. I have all the motion sorted out and am working on the laser control.

Figure 1. The GRBL 1.1 pinout. Pin 11 is used for spindle (cutter) speed on a milling machine or laser power control on a laser cutter.
The machine is using a Synrad 48 Series laser module which requires a 5 kHz PWM frequency (page 45 - 46).
The GRBL 1.1 sketch can be configured for a variety of PWM frequencies. See cpu_map.h.
  // Prescaled, 8-bit Fast PWM mode.
  #define SPINDLE_TCCRA_INIT_MASK   ((1<<WGM20) | (1<<WGM21))  // Configures fast PWM mode.
  // #define SPINDLE_TCCRB_INIT_MASK   (1<<CS20)               // Disable prescaler -> 62.5kHz
  // #define SPINDLE_TCCRB_INIT_MASK   (1<<CS21)               // 1/8 prescaler -> 7.8kHz (Used in v0.9)
  // #define SPINDLE_TCCRB_INIT_MASK   ((1<<CS21) | (1<<CS20)) // 1/32 prescaler -> 1.96kHz
  #define SPINDLE_TCCRB_INIT_MASK      (1<<CS22)               // 1/64 prescaler -> 0.98kHz (J-tech laser)

  // NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings.
  #define SPINDLE_PWM_DDR     DDRB
  #define SPINDLE_PWM_PORT  PORTB
  #define SPINDLE_PWM_BIT     3    // Uno Digital Pin 11

It seems that my options are 62.5 kHz, 7.8 kHz, 1.96 kHz or 0.98 kHz.
Why does it matter? Two excerpts from the Synrad manual:

Tickle frequencies [a 'keep-awake' signal at zero power] lower than 4.5 kHz may compromise laser performance, ..., and stress the RF [radio frequency] electronics thereby reducing long term reliability while tickle frequencies greater than 5 kHz may cause unintended lasing.
Because laser output follows PWM input with a rise and fall time constant of ~100 µs, the laser cannot precisely follow Command signal frequencies over t kHz with duty cycles greater than 50%.

Can anyone see a workaround for this within the constraints of the GRBL configuration?
I can only think of a hardware solution to filter the PWM out and run it through another device to convert the analog signal to a 5 kHz PWM.
Many thanks.

user43025: The simple way, which may interfere with the timing of your other digital outputs:  https://playground.arduino.cc/Code/PwmFrequency 
Or, if you are willing to put the PWM output on pin 9/10 and manipulate the AVR registers directly:
Digital pins 9 (OC1A) and 10 (OC1B) are outputs of the AVR 16-bit timer (TIMER1) on 328p.  With those you can get a PWM signal at 5.000 kHz, but if you need reliability then an Arduino with external crystal resonator may be needed.   You will need to set the registers TCCR1A, TCCR1B and OCR1A,OCR1B,ICR1,TIFR1 appropriately, details can be found in the AVR datasheet.  

user7508: No, you cannot have hardware PWM at 5 kHz on pin 11 of an Arduino
Uno. The closest you can get is 3.92 kHz. You get that by setting
the prescaler to 8 and configuring the timer for phase correct PWM,
instead of the fast PWM mode usually used by GRBL. Your options for
getting 5 kHz are to use either software PWM or change the pinout.
You can get a quite accurate 5 kHz PWM signal on pins 3, 9
and 10. You can do software PWM at 5 kHz on any pin, but this
is prone to have significant jitter, which your laser may well not like.

13749: <p>I'm rebuilding a laser CNC machine and using <a href="https://github.com/LaserWeb/LaserWeb4/wiki" rel="nofollow noreferrer">LaserWeb4</a> as the control interface and <a href="https://github.com/gnea/grbl/wiki/Connecting-Grbl" rel="nofollow noreferrer">GRBL 1.1</a> as the low-level interface to the stepper motors, limit switches and the laser. I have all the motion sorted out and am working on the laser control.</p>
<p><a href="https://i.stack.imgur.com/jb1Sn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jb1Sn.png" alt="enter image description here" /></a></p>
<p><em>Figure 1. The GRBL 1.1 pinout. Pin 11 is used for spindle (cutter) speed on a milling machine or laser power control on a laser cutter.</em></p>
<p>The machine is using a <a href="https://www.synrad.com/sites/default/files/2017-07/Operators%20Manual%2048%20Series.pdf" rel="nofollow noreferrer">Synrad 48 Series</a> laser module which requires a 5 kHz PWM frequency (page 45 - 46).</p>
<p>The GRBL 1.1 sketch can be configured for a variety of PWM frequencies. See <a href="https://github.com/gnea/grbl/blob/master/grbl/cpu_map.h" rel="nofollow noreferrer">cpu_map.h</a>.</p>
<pre><code>  // Prescaled, 8-bit Fast PWM mode.
  #define SPINDLE_TCCRA_INIT_MASK   ((1&lt;&lt;WGM20) | (1&lt;&lt;WGM21))  // Configures fast PWM mode.
  // #define SPINDLE_TCCRB_INIT_MASK   (1&lt;&lt;CS20)               // Disable prescaler -&gt; 62.5kHz
  // #define SPINDLE_TCCRB_INIT_MASK   (1&lt;&lt;CS21)               // 1/8 prescaler -&gt; 7.8kHz (Used in v0.9)
  // #define SPINDLE_TCCRB_INIT_MASK   ((1&lt;&lt;CS21) | (1&lt;&lt;CS20)) // 1/32 prescaler -&gt; 1.96kHz
  #define SPINDLE_TCCRB_INIT_MASK      (1&lt;&lt;CS22)               // 1/64 prescaler -&gt; 0.98kHz (J-tech laser)

  // NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings.
  #define SPINDLE_PWM_DDR     DDRB
  #define SPINDLE_PWM_PORT  PORTB
  #define SPINDLE_PWM_BIT     3    // Uno Digital Pin 11
</code></pre>
<p>It seems that my options are 62.5 kHz, 7.8 kHz, 1.96 kHz or 0.98 kHz.</p>
<p>Why does it matter? Two excerpts from the Synrad manual:</p>
<blockquote>
<p>Tickle frequencies [a 'keep-awake' signal at zero power] lower than 4.5 kHz may compromise laser performance, ..., and stress the RF [radio frequency] electronics thereby reducing long term reliability while tickle frequencies greater than 5 kHz may cause unintended lasing.</p>
<p>Because laser output follows PWM input with a rise and fall time constant of ~100 µs, the laser cannot precisely follow Command signal frequencies over t kHz with duty cycles greater than 50%.</p>
</blockquote>
<p>Can anyone see a workaround for this within the constraints of the GRBL configuration?</p>
<p>I can only think of a hardware solution to filter the PWM out and run it through another device to convert the analog signal to a 5 kHz PWM.</p>
<p>Many thanks.</p>
 43025: <p>The simple way, which may interfere with the timing of your other digital outputs:  <a href="https://playground.arduino.cc/Code/PwmFrequency" rel="nofollow noreferrer">https://playground.arduino.cc/Code/PwmFrequency</a> </p>

<p>Or, if you are willing to put the PWM output on pin 9/10 and manipulate the AVR registers directly:</p>

<p>Digital pins 9 (<code>OC1A</code>) and 10 (<code>OC1B</code>) are outputs of the AVR 16-bit timer (TIMER1) on 328p.  With those you can get a PWM signal at 5.000 kHz, but if you need reliability then an Arduino with external crystal resonator may be needed.   You will need to set the registers <code>TCCR1A</code>, <code>TCCR1B</code> and <code>OCR1A</code>,<code>OCR1B</code>,<code>ICR1</code>,<code>TIFR1</code> appropriately, details can be found in the AVR datasheet.  </p>
 7508: <p>No, you cannot have hardware PWM at 5&nbsp;kHz on pin 11 of an Arduino
Uno. The closest you can get is 3.92&nbsp;kHz. You get that by setting
the prescaler to&nbsp;8 and configuring the timer for phase correct PWM,
instead of the fast PWM mode usually used by GRBL. Your options for
getting 5&nbsp;kHz are to use either software PWM or change the pinout.</p>

<p>You can get a quite accurate 5&nbsp;kHz PWM signal on pins&nbsp;3, 9
and&nbsp;10. You can do software PWM at 5&nbsp;kHz on any pin, but this
is prone to have significant jitter, which your laser may well not like.</p>
