qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
17.97k stars 38.64k forks source link

[Bug] WS2812 driver with Tim3 Audio enabled causes hard lock on AVR #9985

Open drashna opened 4 years ago

drashna commented 4 years ago

Describe the Bug

If you enable audio on any of the Tim3 pins (B5-7), and enable WS2812 (either rgblight or rgb matrix using ws2812) it causes the controller to hard lock on initialization.

Tested on a pro micro and elite C, noticed previously on an atmega32u2.

System Information

sigprof commented 4 years ago

What are the exact steps to reproduce the problem? My attempt to reproduce this with a 5V Pro Micro and the slightly modified handwired/onekey/promicro code (added #define B5_AUDIO and even #define AUDIO_CLICKY, compiled with make handwired/onekey/promicro:rgb:flash LTO_ENABLE=yes AUDIO_ENABLE=yes SLEEP_LED_ENABLE=no COMMAND_ENABLE=no) did not show any problems.

drashna commented 3 years ago

I used an Elite C and Pro Micro.

RGBLIGHT_ENABLE = yes
AUDIO_ENABLE = yes

RGB pin set to F6.

Set the audio to b5, b6 or b7,

I tested this with a Launchpad macropad, initially.