These two days, I made a Number of PAD with STM32F103 and lit the LED with PWM. According to the QMK document, just enable the corresponding configuration.
undef HAL_USE_PWM
define HAL_USE_PWM TRUE
undef STM32_PWM_USE_TIM3
define STM32_PWM_USE_TIM3 TRUE
define BACKLIGHT_PIN A6 //A6 A7 B0 B1
define BACKLIGHT_PWM_DRIVER PWMD3
define BACKLIGHT_PWM_CHANNEL 1
define BACKLIGHT_PAL_MODE 2
It's a pity to use TIMER3 for knowing why it doesn't work.
//#define BACKLIGHT_PAL_MODE 2
This problem was originally caused by #define BACKLIGHT_PAL_MODE 2, it is normal to comment it out, but I do not know if it is a bug.
These two days, I made a Number of PAD with STM32F103 and lit the LED with PWM. According to the QMK document, just enable the corresponding configuration.
undef HAL_USE_PWM
define HAL_USE_PWM TRUE
undef STM32_PWM_USE_TIM3
define STM32_PWM_USE_TIM3 TRUE
define BACKLIGHT_PIN A6 //A6 A7 B0 B1
define BACKLIGHT_PWM_DRIVER PWMD3
define BACKLIGHT_PWM_CHANNEL 1
define BACKLIGHT_PAL_MODE 2
It's a pity to use TIMER3 for knowing why it doesn't work.