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.
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.