qmk/qmk_firmware

[Bug] WS2812 PWM Does Not Work On STM32F042X

Open

#14,129 建立於 2021年8月23日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C (43,867 fork)batch import
bughelp wanted

倉庫指標

Star
 (20,368 star)
PR 合併指標
 (平均合併 20天 9小時) (30 天內合併 27 個 PR)

描述

Describe the Bug

When using the PWM driver for the WS2812 LED's does not function (they do not light).

The normal bitbang driver functions as expected

Specific chip : STM32F042F6P7 / TSSOP20

System Information

  • Keyboard: Development breakout board
  • Operating system: Linux
  • ARM GCC version: 11.2.0
  • QMK Firmware version: master
  • Any keyboard related software installed? : NA

Additional Context

I have tested CH2 and 4 on TIM3, below is the configuration when using CH2 (A7)

config.h

#define RGBLIGHT_ANIMATIONS
#define RGB_DI_PIN A7

#define WS2812_PWM_DRIVER PWMD3 
#define WS2812_PWM_CHANNEL 2
#define WS2812_PWM_PAL_MODE 1
#define WS2812_DMA_STREAM STM32_DMA1_STREAM3
#define WS2812_DMA_CHANNEL 3

mcuconf.h

#pragma once

#include_next <mcuconf.h>

#undef STM32_PWM_USE_TIM3
#define STM32_PWM_USE_TIM3 TRUE

#define HAL_USE_PWM TRUE is enabled on halconfig and WS2812_DRIVER is set to pwm in rules.mk

貢獻者指南