-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flickering #30
Comments
Thanks for the praise, let me return it - finally, a well done bug report ... As the PWM is done in software, there is always the possibility for some other interrupt handler to delay the PWM interrupt handler. Are there any other interrupt routines? One possible mitigation is to lower the PWM frequency, 20kHz is quite high for lighting applications. Are the long pulses isolated, or do they appear in groups? Can you do a trace including several pulses? |
Thank for your prompt reply.
None I am aware of. Testcase only uses ESP8266_NONOS_SDK, your PWM implementation and the code from this report. I also had to add following definition as #define ICACHE_RAM_ATTR __attribute__((section(".text"))) I set it up using PlatformIO. I am observing the same problem in my project based on Mongoose OS which internally uses ESP8266_NONOS_SDK 2.1.0. (BTW there ICACHE_RAM_ATTR is known).
I've tried to set period to 1200 for the same duty (20) but the problem is still there.
They seem to be isolated. I captured a trace with many pulses and focused on that wide one, then checked cca 10 on both sides and they were of "normal" width. |
As I mentioned our product uses Mongoose OS. After we added Azure IoT functionality, the PWM quality rapidly decreased. Surprisingly (for me) |
Hello,
First thanks for the library which I consider to be the best OSS PWM library for ESP8266 I found.
I am observing soft LED flickering when using this PWM implementation.
The complete code:
Measurements with oscilloscope shows that most of the pulses take 4.07 μs:
But if I set trigger to pulse width of higher values, then it often triggers:
Original firmware of the device, which is closed source, doesn't have this issue. But according to strings in the binary blob it seems to be build with RTOS.
Is there anything I can do to prevent this?
The text was updated successfully, but these errors were encountered: