- Notifications
You must be signed in to change notification settings - Fork13.3k
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
68 commits Select commitHold shift + click to select a range
2c010d6 Re-implement PWM generator logic
earlephilhower122ca23 Merge branch 'master' into realpwm
earlephilhower118103b Adjust running PWM when analogWriteFreq changed
earlephilhower5cd145e Also preserve phase of running tone/waveforms
earlephilhower4ce623d Clean up signed/unsigned mismatch, 160MHz operat'n
earlephilhower3a6f6c1 Turn off PWM on a Tone or digitalWrite
earlephilhower27ee6f8 Remove hump due to fixed IRQ delta
earlephilhower5faf6be Speed PWM generator by reordering data struct
earlephilhower94af195 Remove if() that could never evaluate TRUE
earlephilhower1182cd0 Add error feedback to waveform generation
earlephilhower7ee7d19 Move _stopPWM and _removePWMEntry to IRAM
earlephilhowerc12e961 Avoid long wait times when PWM freq is low
earlephilhower143b6ae Merge branch 'master' into realpwm
earlephilhowera783621 Fix bug where tone/pwm could happen on same pin
earlephilhowerad3076c Adjust for random 160MHZ operation
earlephilhowerdc32961 Clean up leftover debugs in ISR
earlephilhowerec62ee3 Subtract constant-time overhead for PWM, add 60khz
earlephilhowera41890b Fix GPIO16 not toggling properly.
earlephilhower42bbede Remove constant offset to PWM period
earlephilhower79a7f7d Remove volatiles, replace with explicit membarrier
earlephilhowercbff7a3 Consolidate data into single structure
earlephilhower4196bf8 Factor out common timer shutdown code
earlephilhower14f4416 Remove unneeded extra copy on PWM start
earlephilhower2002a5d Factor out common edge work in waveform loop
earlephilhower5b1f288 Factor out waveform phase feedback loop math
earlephilhowerf42696c Reduce PWM size by using 32b count, indexes
earlephilhower2b0dde4 GP16O is a 1-bit register, just write to it
earlephilhowerb0e818f Merge branch 'master' into realpwm
earlephilhowerdfaa9ce Increase PWM linearity in low/high regions
earlephilhower3909ada Remove redundant GetCycleCount (non-IRQ)
earlephilhower413cd17 Factor out common timer setup operations
earlephilhower07f5ff1 Fix clean-waveform transition, lock to tone faster
earlephilhower539d0d4 Reduce code size ~145 bytes
earlephilhowerdf51b21 Reduce IRAM by pushing more work to _setPWM
earlephilhower867b181 Fix typo in PWM pin 1->0 transition
earlephilhowerf757778 Combine cleanup and pin remove, save 50 bytes IROM
earlephilhower9424090 Remove unused analogMap, toneMap
earlephilhowerc8b53ef Save IRAM/heap by adjusting WVF update struct
earlephilhowere6b7aa1 Don't duplicate PWM period calculation
earlephilhower28645ff Factor out common PWM update code
earlephilhower3ee638c Merge branch 'master' into realpwm
earlephilhower174d19e Clean up old comments
earlephilhowera910eae Fix indent, remove some unneeded if-else branches
earlephilhower179b9d6 Fix regression when analogWrite done cold
earlephilhowere44171f Save 16b of IRAM by not re-setting edge intr bit
earlephilhower7fe9a2d Allow on-the-fly PWM frequency changes
earlephilhowere7cb533 Adjust for fixed overhead on PWM period
earlephilhower083560d Fix value reversal when analogWrite out of range
earlephilhowere421d81 Merge branch 'master' into realpwm
earlephilhower5be4961 Don't optimize the satopWaveform call
earlephilhower051008a Avoid side effects in addPWMtoList
earlephilhower6692418 Adjust PWM period as fcn of # of PWM pins
earlephilhower606c5cd Merge branch 'master' into realpwm
earlephilhower524f047 Fix occasional Tone artifacts
earlephilhower361d4a2 Reduce CPU usage and enhance low range PWM output
earlephilhower975fe12 Merge branch 'master' into realpwm
earlephilhower9e48706 Update min IRQ time to remove humps in PWM linearity
earlephilhower565f21f Remove minor bump at high PWM frequencies
earlephilhower272dc9d Undo the 160->80 frequency adjust
earlephilhower8f9af5d Merge branch 'master' into realpwm
earlephilhower2961933 Merge branch 'master' into realpwm
earlephilhowere5afab0 Merge branch 'master' into realpwm
earlephilhowere5ba217 Update core_esp8266_wiring_pwm.cpp
earlephilhowerf911754 Update core_esp8266_wiring_pwm.cpp
earlephilhower1b34278 Merge branch 'master' into realpwm
d-a-v55e8abb Merge branch 'master' of https://github.com/esp8266/Arduino into realpwm
earlephilhower4cc3d8a Fix Servo shutdown changes which caused trouble with Servo::detach()
earlephilhowera353909 Servo shutdown tweak in PWM path
earlephilhowerFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Factor out common edge work in waveform loop
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit2002a5ddfe78894f6c3c8f35a0c0e3b588351e9a
There are no files selected for viewing
28 changes: 22 additions & 6 deletionscores/esp8266/core_esp8266_waveform.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.