8000 Keep PWM phases constant by s-hadinger · Pull Request #7057 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Keep PWM phases constant #7057

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
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Better handling of interrupt storm during wifi connection
  • Loading branch information
s-hadinger committed Apr 8, 2020
commit 4f4b5041a17265e03f7e839bc55fdb1136924400
2 changes: 1 addition & 1 deletion cores/esp8266/core_esp8266_waveform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static ICACHE_RAM_ATTR void timer1Interrupt() {
//
// detect interrupt storm, for example during wifi connection.
// if we overshoot the cycle by more than 25%, we forget phase and keep PWM duration
int32_t overshoot = (-cyclesToGo) > ((wave->nextTimeHighCycles + wave->nextTimeLowCycles) >> 2);
int32_t overshoot = ((uint32_t)-cyclesToGo) > ((wave->nextTimeHighCycles + wave->nextTimeLowCycles) >> 2);
waveformState ^= mask;
if (waveformState & mask) {
if (i == 16) {
Expand Down
0