From 18a333ec6bc9051ae7ec63a809d725c5c5f77046 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 3 Mar 2021 07:26:06 +0300 Subject: Add support for complementary outputs to the WS2812 PWM driver (#11988) --- docs/ws2812_driver.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/ws2812_driver.md') diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index cca6827ec8..fa14f02fdb 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -102,11 +102,14 @@ Configure the hardware via your config.h: #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_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy). #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. #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. ``` +Note that using a complementary timer output (TIMx_CHyN) is possible only for advanced-control timers (TIM1, TIM8, TIM20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in mcuconf.h must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations. + You must also turn on the PWM feature in your halconf.h and mcuconf.h #### Testing Notes -- cgit v1.2.3