ServoESP32 icon indicating copy to clipboard operation
ServoESP32 copied to clipboard

Incompatible with Preference.h (Flash writing)

Open NilsIoT opened this issue 2 years ago • 0 comments

On a Firebeetle ESP32 board, Servo.h can make it impossible to write to Onboard Flash. Reproduce like this:

  1. Attach more than 8 servos (I used 9) (in software; hardware doesn't matter)
  2. Sometimes required, sometimes not: Output PWM on 9th attached servo using any pin. It is not important what you do with the first 8 servos or if you use them at all.
  3. Try to use Preferences.h to write to on-board Flash: Cannot write, and read only returns the default value. No error messages.
  4. Detach Servos
  5. Try to use Preferences.h again: Works fine

The error occurs irrespective of what pins are used for the Servo. I suspect a problem with timer allocation or something like that, but I am no expert in ESP32 timers or the two libraries involved.

NilsIoT avatar Dec 03 '21 21:12 NilsIoT