aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ws2812_driver.md36
1 files changed, 34 insertions, 2 deletions
diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md
index 80b694858..51b053b9b 100644
--- a/docs/ws2812_driver.md
+++ b/docs/ws2812_driver.md
@@ -15,7 +15,7 @@ These LEDs are called "addressable" because instead of using a wire per color, e
| bit bang | :heavy_check_mark: | :heavy_check_mark: |
| I2C | :heavy_check_mark: | |
| SPI | | :heavy_check_mark: |
-| PWM | | Soon™ |
+| PWM | | :heavy_check_mark: |
## Driver configuration
@@ -66,4 +66,36 @@ While not an exhaustive list, the following table provides the scenarios that ha
| f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A |
| f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: |
-*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.* \ No newline at end of file
+*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
+
+### PWM
+
+Targeting STM32 boards where WS2812 support is offloaded to an PWM timer and DMA stream. The advantage is that the use of DMA offloads processing of the WS2812 protocol from the MCU. To configure it, add this to your rules.mk:
+
+```make
+WS2812_DRIVER = pwm
+```
+
+Configure the hardware via your config.h:
+```c
+#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
+#define WS2812_PWM_CHANNEL 2 // default: 2
+#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
+#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+```
+
+You must also turn on the PWM feature in your halconf.h and mcuconf.h
+
+#### Testing Notes
+
+While not an exhaustive list, the following table provides the scenarios that have been partially validated:
+
+| | Status |
+|-|-|
+| f072 | ? |
+| f103 | :heavy_check_mark: |
+| f303 | :heavy_check_mark: |
+| f401/f411 | :heavy_check_mark: |
+
+*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*