qmk/qmk_firmware

[Bug] WS2812 PWM Does Not Work On STM32F042X

Open

#14 129 ouverte le 23 août 2021

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)C (43 867 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (20 368 stars)
Métriques de merge PR
 (Merge moyen 20j 9h) (27 PRs mergées en 30 j)

Description

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

Guide contributeur