Change default ARM hardware PWM WS2812 tick frequency to 800kHz #24508
+11
−43
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.
Description
When testing the WS2812 signal using ARM PWM hardware, my oscilloscope revealed that each bit width was erroneously 12.5us instead of 1.25us. The PWM still worked because this was less than the reset duration of 80us, but it took much longer to send the frame of data and is not what should be happening. This PR corrects that issue, as well as updates some incorrect terminology/variable naming within the ARM PWM hardware driver.
There have been references to hardware not working with the frequency set to 800,000Hz several years ago, which no one seems to currently be able to reproduce. The value of 800,000Hz (period 1.25us) is objectively correct, and if there happens to still exist hardware which does not support that PWM frequency, then that hardware is the exception that will require tailoring with
#define
The ARM PWM hardware code also now properly uses the
#define
values to configure pulse widths for 1 and 0.The PWM frequency (800kHz) is now properly referred to as frequency, and the clock rate is referred to as the PWM tick frequency.
Keyboards which were manually setting the PWM frequency to 800kHz have also been updated to remove that configuration line (since the default value will now be 800kHz).
Types of Changes
Issues Fixed or Closed by This PR
Checklist