Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Re-implement PWM generator logic#7231

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
earlephilhower merged 68 commits intoesp8266:masterfromearlephilhower:realpwm
Nov 20, 2020
Merged
Changes from1 commit
Commits
Show all changes
68 commits
Select commitHold shift + click to select a range
2c010d6
Re-implement PWM generator logic
earlephilhowerApr 19, 2020
122ca23
Merge branch 'master' into realpwm
earlephilhowerApr 19, 2020
118103b
Adjust running PWM when analogWriteFreq changed
earlephilhowerApr 19, 2020
5cd145e
Also preserve phase of running tone/waveforms
earlephilhowerApr 19, 2020
4ce623d
Clean up signed/unsigned mismatch, 160MHz operat'n
earlephilhowerApr 19, 2020
3a6f6c1
Turn off PWM on a Tone or digitalWrite
earlephilhowerApr 20, 2020
27ee6f8
Remove hump due to fixed IRQ delta
earlephilhowerApr 21, 2020
5faf6be
Speed PWM generator by reordering data struct
earlephilhowerApr 22, 2020
94af195
Remove if() that could never evaluate TRUE
earlephilhowerApr 24, 2020
1182cd0
Add error feedback to waveform generation
earlephilhowerApr 27, 2020
7ee7d19
Move _stopPWM and _removePWMEntry to IRAM
earlephilhowerApr 27, 2020
c12e961
Avoid long wait times when PWM freq is low
earlephilhowerApr 27, 2020
143b6ae
Merge branch 'master' into realpwm
earlephilhowerApr 28, 2020
a783621
Fix bug where tone/pwm could happen on same pin
earlephilhowerApr 28, 2020
ad3076c
Adjust for random 160MHZ operation
earlephilhowerApr 28, 2020
dc32961
Clean up leftover debugs in ISR
earlephilhowerApr 28, 2020
ec62ee3
Subtract constant-time overhead for PWM, add 60khz
earlephilhowerApr 28, 2020
a41890b
Fix GPIO16 not toggling properly.
earlephilhowerApr 28, 2020
42bbede
Remove constant offset to PWM period
earlephilhowerApr 29, 2020
79a7f7d
Remove volatiles, replace with explicit membarrier
earlephilhowerApr 29, 2020
cbff7a3
Consolidate data into single structure
earlephilhowerApr 29, 2020
4196bf8
Factor out common timer shutdown code
earlephilhowerApr 29, 2020
14f4416
Remove unneeded extra copy on PWM start
earlephilhowerApr 29, 2020
2002a5d
Factor out common edge work in waveform loop
earlephilhowerApr 29, 2020
5b1f288
Factor out waveform phase feedback loop math
earlephilhowerApr 29, 2020
f42696c
Reduce PWM size by using 32b count, indexes
earlephilhowerApr 29, 2020
2b0dde4
GP16O is a 1-bit register, just write to it
earlephilhowerApr 29, 2020
b0e818f
Merge branch 'master' into realpwm
earlephilhowerApr 29, 2020
dfaa9ce
Increase PWM linearity in low/high regions
earlephilhowerMay 3, 2020
3909ada
Remove redundant GetCycleCount (non-IRQ)
earlephilhowerMay 3, 2020
413cd17
Factor out common timer setup operations
earlephilhowerMay 3, 2020
07f5ff1
Fix clean-waveform transition, lock to tone faster
earlephilhowerMay 3, 2020
539d0d4
Reduce code size ~145 bytes
earlephilhowerMay 4, 2020
df51b21
Reduce IRAM by pushing more work to _setPWM
earlephilhowerMay 4, 2020
867b181
Fix typo in PWM pin 1->0 transition
earlephilhowerMay 5, 2020
f757778
Combine cleanup and pin remove, save 50 bytes IROM
earlephilhowerMay 5, 2020
9424090
Remove unused analogMap, toneMap
earlephilhowerMay 5, 2020
c8b53ef
Save IRAM/heap by adjusting WVF update struct
earlephilhowerMay 5, 2020
e6b7aa1
Don't duplicate PWM period calculation
earlephilhowerMay 5, 2020
28645ff
Factor out common PWM update code
earlephilhowerMay 5, 2020
3ee638c
Merge branch 'master' into realpwm
earlephilhowerMay 5, 2020
174d19e
Clean up old comments
earlephilhowerMay 5, 2020
a910eae
Fix indent, remove some unneeded if-else branches
earlephilhowerMay 5, 2020
179b9d6
Fix regression when analogWrite done cold
earlephilhowerMay 5, 2020
e44171f
Save 16b of IRAM by not re-setting edge intr bit
earlephilhowerMay 6, 2020
7fe9a2d
Allow on-the-fly PWM frequency changes
earlephilhowerMay 7, 2020
e7cb533
Adjust for fixed overhead on PWM period
earlephilhowerMay 8, 2020
083560d
Fix value reversal when analogWrite out of range
earlephilhowerMay 8, 2020
e421d81
Merge branch 'master' into realpwm
earlephilhowerMay 9, 2020
5be4961
Don't optimize the satopWaveform call
earlephilhowerMay 10, 2020
051008a
Avoid side effects in addPWMtoList
earlephilhowerMay 13, 2020
6692418
Adjust PWM period as fcn of # of PWM pins
earlephilhowerMay 18, 2020
606c5cd
Merge branch 'master' into realpwm
earlephilhowerJun 4, 2020
524f047
Fix occasional Tone artifacts
earlephilhowerJun 6, 2020
361d4a2
Reduce CPU usage and enhance low range PWM output
earlephilhowerJun 6, 2020
975fe12
Merge branch 'master' into realpwm
earlephilhowerJun 7, 2020
9e48706
Update min IRQ time to remove humps in PWM linearity
earlephilhowerJun 7, 2020
565f21f
Remove minor bump at high PWM frequencies
earlephilhowerJun 7, 2020
272dc9d
Undo the 160->80 frequency adjust
earlephilhowerJun 8, 2020
8f9af5d
Merge branch 'master' into realpwm
earlephilhowerJul 13, 2020
2961933
Merge branch 'master' into realpwm
earlephilhowerAug 23, 2020
e5afab0
Merge branch 'master' into realpwm
earlephilhowerAug 29, 2020
e5ba217
Update core_esp8266_wiring_pwm.cpp
earlephilhowerAug 29, 2020
f911754
Update core_esp8266_wiring_pwm.cpp
earlephilhowerAug 29, 2020
1b34278
Merge branch 'master' into realpwm
d-a-vOct 26, 2020
55e8abb
Merge branch 'master' of https://github.com/esp8266/Arduino into realpwm
earlephilhowerNov 20, 2020
4cc3d8a
Fix Servo shutdown changes which caused trouble with Servo::detach()
earlephilhowerNov 20, 2020
a353909
Servo shutdown tweak in PWM path
earlephilhowerNov 20, 2020
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
PrevPrevious commit
NextNext commit
Increase PWM linearity in low/high regions
By adjusting the PWM cycle slightly to account for the fixed timethrough the compute loop, increase the linear response near the min andmax areas.
  • Loading branch information
@earlephilhower
earlephilhower committedMay 3, 2020
commitdfaa9cebcab413e90b18d0ecba4aa5ede4c50954
4 changes: 2 additions & 2 deletionscores/esp8266/core_esp8266_waveform.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -491,8 +491,8 @@ static ICACHE_RAM_ATTR void timer1Interrupt() {
} while (pwmState.delta[pwmState.idx] == 0);
}
// Preserve duty cycle over PWM period by using now+xxx instead of += delta
pwmState.nextServiceCycle = now + adjust(pwmState.delta[pwmState.idx]);
cyclesToGo =pwmState.nextServiceCycle- now; // Guaranteed to be >= 0 always
cyclesToGo = adjust(pwmState.delta[pwmState.idx]);
pwmState.nextServiceCycle= GetCycleCountIRQ() + cyclesToGo;
}
nextEventCycles = min_u32(nextEventCycles, cyclesToGo);
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp