xTaskCreate corrupts WS2812 LED signals

boarchuz
Posts: 656
Joined: Tue Aug 21, 2018 5:28 am

Re: xTaskCreate corrupts WS2812 LED signals

Postby boarchuz » Tue Feb 25, 2025 5:41 pm

Are you using a C3 with embedded flash? I don't think GPIO12 is safe for use, if so.

espmich
Posts: 41
Joined: Tue Jan 16, 2024 8:32 pm

Re: xTaskCreate corrupts WS2812 LED signals

Postby espmich » Tue Feb 25, 2025 7:48 pm

Thanks boarchuz, this is the correct answer to my question why the WS2812B connected to GPIO 8 fails when a task flip flops the GPIO 12. The reason is most certainly due to my use of embedded flash in the ESP32-C3 MCU, and the undefined behaviour when overloading the pin for general purpose use.

The sad thing is that there are not enough GPIO pins on a C3 part, so it leads some of us to do unconventional things.

If I change the GPIO 12 to GPIO 13 in my code, everything works correctly. According to the Espressif documents, both 12 and 13 are unsupported, so my own risky decisions are hit and miss while sometimes working correctly even on unsupported pins.

Thanks again for finding this answer!

Who is online

Users browsing this forum: No registered users and 1 guest