# tone\(\) or the Servo library breaks PWM on some pins: timer conflicts

> Fix PWM that stops when you use tone\(\) or Servo: they share hardware timers with analogWrite on certain pins, so move the PWM pin or the feature.

Canonical: https://roboticsengineering.in/fix/arduino-tone-breaks-pwm-servo-timer-conflict/ | Published: 2026-11-03 | Updated: 2026-11-03

**On an Uno, tone() uses Timer 2 and Servo uses Timer 1.** That removes PWM on some pins while they are in use.

## What the message means

The board has only a few timers. Libraries claim them, and pins tied to that timer lose analogWrite.

## Fix it in this order

1. Check which pins share the timer that your library uses, in the board documentation.
2. With the Servo library on an Uno, analogWrite on pins 9 and 10 stops working.
3. With tone() on an Uno, PWM on pins 3 and 11 is affected.
4. Move your PWM output to a pin on a different timer.
5. Use a board with more timers, or a servo driver board, if you need many.
6. Stop the tone before you use the affected pin.

## Why it happens

The ATmega328P on an Uno has three hardware timers, and each one drives specific PWM pins. The tone function uses Timer 2, which also drives PWM on pins 3 and 11. The Servo library uses Timer 1, which drives pins 9 and 10, so analogWrite on those two pins stops working while Servo is in use. The ATmega328P datasheet maps each PWM pin to its timer.

Other boards have a different mapping. On a Mega, the Servo library takes different timers, so check the board documentation before moving a PWM output.

## If you see this, do this

| You see | Do this |
| --- | --- |
| PWM stops after adding Servo | Timer 1 conflict. |
| PWM odd while a tone plays | Timer 2 conflict. |

## Related

[PWM frequency](https://roboticsengineering.in/fix/arduino-pwm-motor-whine-frequency/), [servo jitter](https://roboticsengineering.in/fix/arduino-servo-jitter-twitching/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
