DRV8835 combined with servo output

I have a Pololu PrimeLV with an 8835 motor driver. I’m powering a little “runt rover” from ServoCity. The 8835 is great for driving those motors, but I’d like to add r/c servos (PWM) for arm functionality as well. The issue I’m finding is that as soon as I declare a servo.attach(pin#) command, the 8835 gets upset and no longer drives the DC motors. Specifically, M1 turns on full power, and M2 responds in fits and starts. I found this by commenting out code until functionality returned, ultimately isolating the servo.attach portion (no writing to the servo necessary- simply declaring it causes the problem!)
Looking into this a bit, I see there’s an arduino issue where the pwm clock is tied to pins 8 & 9, and that clock is needed for servo.h to drive servos. https://forum.arduino.cc/t/dc-motors-doesnt-work-when-attaching-servo/462978
Is there a work-around? It seems like this would be a relatively common issue for a Leonardo, wanting to drive both DC motors and r/c servos.
The article referenced moving the DC motor controller, but the nice little pololu board fits so well on pins 6-10, bridging to power on the other side.


Probably the easiest workaround is to modify the Arduino servo library to use Timer 3 instead of Timer 1 for ATmega32U4-based controllers (like the A-Star Prime LV). You can find instructions for doing this in the “Controlling a servo” section of our Romi 32U4 Control Board user’s guide.