[Solved] BLE Advertising seems to corrupt RMT signals [used for led_strip]
Posted: Wed Feb 26, 2025 10:19 pm
Hello -
First, many thanks in advance for any tips/hints you may be able to provide. I've been fighting with this for about a week and have run out of ideas, so many thanks for any assistance you might be able to provide!
Setup
I have created the simplest possible reproduction application in Github here. I originally wrote the code to include the Espressif LED_Strip component, but the link above shows the version that only uses the RMT component just to remove the component as a potential source of the issue.
Steps to Reproduce
The Neopixel has a total of 8 addressable LEDs. I have set the code to only populate 5 LEDs. Because I'm using GPIO Pin #2 on the Sparkfun board, that means that it will drive the onboard LED plus half of the LEDs on the Neopixel Stick. When I run the code, at some (seemingly) random point in the first 2 minutes, the other LEDs will be lit.
If the is commented-out, the problem does NOT occur. This leads me to believe that there is some sort of interrupted-related issue, but this example is so incredibly simple that it seems hard to believe. To that end, I have specifically moved the LED activities to the second core, but the issue remains. Regardless, I believe all the actual signal generation is happening based on interrupts, so I'm not sure this is even relevant, but I've got it setup to use both cores:
Narrowing Down the issue.
I setup my picoscope and put it on the data line between the Sparkfun board (after the internal LED) and the NeoPixel. Normally, I see the output such as the following:

When I record the oscilloscope capture and then see the corruption, I can find a message such as the following:

I don't know of any alternatives at this point as the ESP32-WROOM doesn't support DMA, so I'm at a bit of a loss.. I'm happy to continue working on this, but wanted to post this in hopes someone with more experience might be able to nudge me in the right direction. Much appreciated in advance for any help that can be provided!
First, many thanks in advance for any tips/hints you may be able to provide. I've been fighting with this for about a week and have run out of ideas, so many thanks for any assistance you might be able to provide!
Setup
- I'm using a Sparkfun ESP32 Things Plus (USB-C) (WRL-20168) that uses the ESP32-WROOM-32E.
- I have a Neopixel Stick with the SKC6812 LEDs attached to pin 2 (although the pin doesn't matter - I can reproduce on other pins as well).
- I'm using esp-idf v5.4
Code: Untitled.txt Select all
dconyers@Mac led_ble_test_app % idf.py --version
ESP-IDF v5.4-552-ge37d33cc1c
I have created the simplest possible reproduction application in Github here. I originally wrote the code to include the Espressif LED_Strip component, but the link above shows the version that only uses the RMT component just to remove the component as a potential source of the issue.
Steps to Reproduce
The Neopixel has a total of 8 addressable LEDs. I have set the code to only populate 5 LEDs. Because I'm using GPIO Pin #2 on the Sparkfun board, that means that it will drive the onboard LED plus half of the LEDs on the Neopixel Stick. When I run the code, at some (seemingly) random point in the first 2 minutes, the other LEDs will be lit.
If the
Code: Select all
ble_advertise()Code: Untitled.txt Select all
I (5786) TaskMonitor: Task count: 10
I (5786) TaskMonitor: Task: LED Controller | Core: 2 | Priority: 5
I (5786) TaskMonitor: Task: main | Core: 1 | Priority: 1
I (5786) TaskMonitor: Task: IDLE0 | Core: -1 | Priority: 0
I (5796) TaskMonitor: Task: IDLE1 | Core: -1 | Priority: 0
I (5796) TaskMonitor: Task: ipc0 | Core: 1 | Priority: 24
I (5806) TaskMonitor: Task: ipc1 | Core: 2 | Priority: 24
I (5806) TaskMonitor: Task: Tmr Svc | Core: -1 | Priority: 1
I (5816) TaskMonitor: Task: esp_timer | Core: 1 | Priority: 22
I (5816) TaskMonitor: Task: nimble_host | Core: 1 | Priority: 21
I (5826) TaskMonitor: Task: btController | Core: 1 | Priority: 23I setup my picoscope and put it on the data line between the Sparkfun board (after the internal LED) and the NeoPixel. Normally, I see the output such as the following:

When I record the oscilloscope capture and then see the corruption, I can find a message such as the following:

I don't know of any alternatives at this point as the ESP32-WROOM doesn't support DMA, so I'm at a bit of a loss.. I'm happy to continue working on this, but wanted to post this in hopes someone with more experience might be able to nudge me in the right direction. Much appreciated in advance for any help that can be provided!