summaryrefslogtreecommitdiff
path: root/docs/library/machine.PWM.rst
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2021-06-18 17:12:44 +0200
committerDamien George <damien@micropython.org>2022-04-04 14:11:31 +1000
commit7a447e08b23f47fac6ebcbe5d60c4e1d0fe0d157 (patch)
treedaa938c7d64250c8fb7e10ea6b19e2bef480b300 /docs/library/machine.PWM.rst
parent71344c15f4ef6efc62fbaeef830fa357ee30dce0 (diff)
docs: Add quickref and docs for mimxrt, including network.LAN docs.
Diffstat (limited to 'docs/library/machine.PWM.rst')
-rw-r--r--docs/library/machine.PWM.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/library/machine.PWM.rst b/docs/library/machine.PWM.rst
index 793c074a3..4b7435577 100644
--- a/docs/library/machine.PWM.rst
+++ b/docs/library/machine.PWM.rst
@@ -78,6 +78,13 @@ Methods
With a single *value* argument the pulse width is set to that value.
+Specific PWM class implementations
+----------------------------------
+
+The following concrete class(es) implement enhancements to the PWM class.
+
+ | :ref:`pyb.Timer for PyBoard <pyb.Timer>`
+
Limitations of PWM
------------------
@@ -90,6 +97,11 @@ Limitations of PWM
80000000 / 267 = 299625.5 Hz, not 300kHz. If the divider is set to 266 then
the PWM frequency will be 80000000 / 266 = 300751.9 Hz, but again not 300kHz.
+ Some ports like the RP2040 one use a fractional divider, which allow a finer
+ granularity of the frequency at higher frequencies by switching the PWM
+ pulse duration between two adjacent values, such that the resulting average
+ frequency is more close to the intended one, at the cost of spectral purity.
+
* The duty cycle has the same discrete nature and its absolute accuracy is not
achievable. On most hardware platforms the duty will be applied at the next
frequency period. Therefore, you should wait more than "1/frequency" before