Skip to content

Commit 47871a4

Browse files
committed
docs/library/machine.PWM: Document hardware PWM layout.
Signed-off-by: Damien George <damien@micropython.org>
1 parent ef2b30b commit 47871a4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/library/machine.PWM.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ Methods
8484
Specific PWM class implementations
8585
----------------------------------
8686

87+
On the alif port there are 11 independent PWM blocks with independent
88+
frequencies, and they have 2 outputs each. The underlying counter is
89+
32-bits wide for all 11 PWM blocks.
90+
91+
On the rp2 port there are 8 independent PWM blocks on RP2040 and 12 on
92+
RP2350, each with independent frequencies, and each with 2 outputs.
93+
The underlying counter is 16-bits wide for all PWM blocks.
94+
95+
On the stm32 port the number of independent PWM blocks depends on the MCU
96+
and can range between 4 and 19. TIM2 and TIM5 blocks (also TIM3 and TIM4
97+
blocks on STM32U5 and STM32N6) are 32-bits wide, and the others are
98+
16-bits wide. All MCUs supported by MicroPython have at least one 32-bit
99+
block available, and most have two. MCUs will have pins PA0 through PA3
100+
assigned to a 32-bit PWM block (except STM32N6 which has a 16-bit PWM
101+
block on PA3). PWM blocks have up to 4 outputs each.
102+
87103
The following concrete class(es) implement enhancements to the PWM class.
88104

89105
| :ref:`pyb.Timer for PyBoard <pyb.Timer>`

0 commit comments

Comments
 (0)