Closed madhephaestus closed 5 months ago
Indeed, I went back to basics and discovered the problem.
One point of note, the way the ESP32S2 core is distributed seems to have changed;
https://www.esp32.com/viewtopic.php?f=19&t=20364
I wonder how different the 'new' core is the the previous one and if other stuff is affected.
can you try to set https://github.com/madhephaestus/ESP32Servo/blob/master/src/ESP32Servo.h#L84 to 10 and https://github.com/madhephaestus/ESP32Servo/blob/master/src/ESP32Servo.h#L85 to 1024 and see if the servo PWM starts working for you?
@madhephaestus Do you have an S2 dev board to test fixes?
I have an ESP32S2 Saola board hooked up on the bench with a scope on the servo pin.
Changing to ;
Gives, using the Sweep.ino example, a pulse period of 250uS.
@lbernstone I do not yet. THis issue will stay open until there is a fix, and i can verify the fix.
@ilush-a this issue is dependant on https://github.com/espressif/arduino-esp32/issues/5050 Once that issue is resolved the the solution published, this issue will go away. The problem is entirely in the lower layer of the stack, not in this code.
any news about the problem with the esp32s2 ? i have now tried it for the first time and i dont know why it doesnt work
Will this be the same for the S3? I'm using a feather and all goes well until about 2 seconds after attach(pin, min, max) when the Hz on that pin drops to zero, and the servo does not centralise as it does on my LOLIN D1 mini (an ESP8266 using the Adafruit Servo library, not this one, I know :smile: ) Up to that point, I'm seeing 50Hz on the pin from bootup.
It seems odd that the core code is broken for over a year and they release a new board with the same broken stuff on it ☹️
I just tested the 10 and 1024 fix mentioned above, and it works fine on the Feather S3, Can that not be committed as a workaround with some testing for ESP32S or ESP32S3 or whatever the magic numbers are?
Less sad now 😄
I can confirm that the problem exists in ESP32-S3, and fixing DEFAULT_TIMER_WIDTH
and DEFAULT_TIMER_WIDTH_TICKS
to
#define DEFAULT_TIMER_WIDTH 10
#define DEFAULT_TIMER_WIDTH_TICKS 1024
solves the issue.
This issue:
https://github.com/espressif/arduino-esp32/issues/5050
is causing this library not to work on the s2 hardware.