Skip to content

Conversation

SuGlider
Copy link
Collaborator

Description of Change

When writing to the same GPIO using RMT, like in a loop, it is necessary to use rmtWriteBlocking() instead of rmtWrite() to avoid issues with FreeRTOS and IDF 4.4.x.

This PR fixes neopixelWrite() (as well as digitalWrite(RGBLED, state)`) in order to avoid such issue.

Tests scenarios

Tested with ESP32-S3

void setup() 
{
  Serial.begin(115200);
  Serial.println("");
  Serial.println("");
}

void loop() 
{
  Serial.println("blink slow");
  for (auto i = 0; i < 10; i++)
  {
     digitalWrite( LED_BUILTIN, i & 1 );
     //uint8_t color = i & 1 ? 32 : 0;
     //neopixelWrite( 48, color, color, color);  // 47 is Lolin S3 onboard LED
     delay(100);
  }
    
  Serial.println("blink fast");
  for (auto i = 0; i < 10; i++)
  {
     digitalWrite( LED_BUILTIN, i & 1 );
     //uint8_t color = i & 1 ? 32 : 0;
     //neopixelWrite( 48, color, color, color);
  }
}

Related links

Closes #9369

@SuGlider SuGlider self-assigned this Mar 14, 2024
@SuGlider SuGlider added Type: Bug 🐛 All bugs Backport needed 🔙 This fix or feature needs to be backported to one or more stable or legacy branches. labels Mar 14, 2024
@SuGlider SuGlider added this to the 2.0.15 milestone Mar 14, 2024
@SuGlider SuGlider linked an issue Mar 14, 2024 that may be closed by this pull request
1 task
@me-no-dev me-no-dev merged commit 2dcb28f into release/v2.x Mar 18, 2024
@me-no-dev me-no-dev deleted the SuGlider-patch-2 branch March 18, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport needed 🔙 This fix or feature needs to be backported to one or more stable or legacy branches. Type: Bug 🐛 All bugs
Projects
Development

Successfully merging this pull request may close these issues.

Rapid NeoPixel updates cause apparent hang on ESP32-S3
3 participants