Skip to content

PWM flicker is back again with new core 2.4.2 #1653

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

Closed
DittelHome opened this issue Aug 15, 2018 · 15 comments
Closed

PWM flicker is back again with new core 2.4.2 #1653

DittelHome opened this issue Aug 15, 2018 · 15 comments
Labels
Category: Core related Related to the (external) core libraries

Comments

@DittelHome
Copy link

With latest build pwm flicker bug is back.
ESP_Easy_mega-20180815_normal_ESP8266_4096.bin

It seems that with new core (2.4.2) pwm is not working correctly. With lower pwm values you get a flicker.
Same as with core version 2.3. With Core 2.4.1 no flickering.
Info says 0000000 instead of 2.4.2:
Libraries: ESP82xx Core 00000000, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3

@TD-er
Copy link
Member

TD-er commented Aug 15, 2018

And this is why I made a separate release with only the core update to get a clear idea what is causing new issues.

@Grovkillen Grovkillen added the Category: Core related Related to the (external) core libraries label Aug 22, 2018
@Domosapiens
Copy link

Domosapiens commented Oct 13, 2018

@DittelHome , @TD-er
mega-20181011
PWM is rock solid again !
Measured Std Dev is less than 1%%
Thanks to core 2.4.1.?
(a few ESPEasy releases before, I measured a Std Dev of 5%)

@TD-er
Copy link
Member

TD-er commented Oct 13, 2018

Yep, I assume it is related to core 2.4.1.
Something has changed there with respect to PWM and we may have to look at it later to see how calling PWM functions have to change to make it work again.
Nothing else has changed with respect to PWM.

@DittelHome
Copy link
Author

Only for clarification:
PWM is working with core 2.4.1
PWM is NOT working with core 2.4.2

@uzi18
Copy link
Contributor

uzi18 commented Oct 13, 2018

is it possible for you to measure pwm frequency on 2.4.1 and 2.4.2?

@Domosapiens
Copy link

Domosapiens commented Oct 14, 2018

@uzi18 Will do on Monday

@Domosapiens
Copy link

@uzi18
Mega-20181011=core 2.4.1: mean freq 998Hz, min freq 994Hz
Mega-20181001=core 2.4.2: mean freq 980Hz, min freq 768Hz

@uzi18
Copy link
Contributor

uzi18 commented Oct 15, 2018

is it possible for You to check also duty cycle on both firmwares?
did you tried to find arduino/esp core issue related to. this?

@uzi18
Copy link
Contributor

uzi18 commented Oct 15, 2018

It could be related to esp8266/Arduino#4640 and esp8266/Arduino#4872

@Domosapiens
Copy link

@uzi18
Duty cycle depends on PWM command, I used PWM,13, 500
Means 500/1023 or around 50%.
Core 2.4.1 measured Std Dev is less than 1%% (meaning the jitter is less then 3%% (3/10th procent!) in 99% of the cases)
Core 2.4.2 measured Std Dev of 5% (meaning the jitter is less then 15% in 99% of the cases

did you tried to find arduino/esp core issue related to. this?

Nope, my programing skills are too rusty.

@s0170071
Copy link
Contributor

The PWM is done in software with a timer interrupt. Thats where the jitter comes from. It may improve if you run the ESP at 160MHz. You do so by selecting the speed in the Arduino IDE dropdown menu prior to flashing.

@Domosapiens
Copy link

@s0170071
PWM has no need for 160Mhz.
Core 2.4.1 is perfect and has almost no jitter
Core 2.4.2 creates the problem.

@uzi18
Copy link
Contributor

uzi18 commented Oct 16, 2018

pwm/tone is generated in new way on 2.4.2, please try to switch to 160 MHz maybe it is solution or still exist bug in arduino 2.4.2, so someone will. need to fill bug report there.

@uzi18
Copy link
Contributor

uzi18 commented Oct 16, 2018

esp8266/Arduino#5248 fix for this?

@tonhuisman
Copy link
Contributor

This issue is no longer relevant, and can be closed.

@TD-er TD-er closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core related Related to the (external) core libraries
Projects
None yet
Development

No branches or pull requests

7 participants