-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RMT test case Infinite Loop on boot even with ERASED all Firmware: ESP32-C6 - 3.0.0 - alpha2 - E (116) rmt(legacy): CONFLICT! driver_ng is not allowed to be used with the legacy driver #8841
Comments
The RMT API has changed in breaking ways. See the examples at https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/RMT |
@gasparo - Indeed RMT isn't working properly for the C6 when using Arduino Core 3.0.0-Alpha2.
At this time, it is already fixed in ESP32 Arduino GitHub master branch. Some information that may help you: 2- the void blinkRGBLED(uint32_t count, uint32_t time_ms) {
const uint8_t LED_Pin = 23; // change it to any other valid GPIO
for ( ; count; count--) {
neopixelWrite(LED_Pin, 255, 255, 255); // RGB = White (on)
delay(time_ms);
neopixelWrite(LED_Pin, 0, 0, 0); // RGB = Black (off)
delay(time_ms);
}
} 3- There is an issue with the function It is possible to use the code from #include "esp32-hal-rgb-led.h"
void my_neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
rmt_data_t led_data[24];
if (!rmtInit(pin, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000)) {
log_e("RGB LED driver initialization failed!");
return;
}
int color[] = {green_val, red_val, blue_val}; // Color coding is in order GREEN, RED, BLUE
int i = 0;
for (int col = 0; col < 3; col++ ) {
for (int bit = 0; bit < 8; bit++) {
if ((color[col] & (1 << (7 - bit)))) {
// HIGH bit
led_data[i].level0 = 1; // T1H
led_data[i].duration0 = 8; // 0.8us
led_data[i].level1 = 0; // T1L
led_data[i].duration1 = 4; // 0.4us
} else {
// LOW bit
led_data[i].level0 = 1; // T0H
led_data[i].duration0 = 4; // 0.4us
led_data[i].level1 = 0; // T0L
led_data[i].duration1 = 8; // 0.8us
}
i++;
}
}
rmtWrite(pin, led_data, RMT_SYMBOLS_OF(led_data), RMT_WAIT_FOR_EVER);
}
void blinkRGBLED(uint32_t count, uint32_t time_ms) {
const uint8_t LED_Pin = 23; // change it to any other valid GPIO
for ( ; count; count--) {
my_neopixelWrite(LED_Pin, 255, 255, 255); // RGB = White (on)
Serial.println("HIGH");
delay(time_ms);
my_neopixelWrite(LED_Pin, 0, 0, 0); // RGB = Black (off)
Serial.println("LOW");
delay(time_ms);
}
}
void setup() {
// No need to initialize the RGB LED
blinkRGBLED(5, 500);
}
// the loop function runs over and over again forever
void loop() {
#ifdef RGB_BUILTIN
digitalWrite(RGB_BUILTIN, HIGH); // Turn the RGB LED white
delay(1000);
digitalWrite(RGB_BUILTIN, LOW); // Turn the RGB LED off
delay(1000);
my_neopixelWrite(PIN_NEOPIXEL, RGB_BRIGHTNESS, 0, 0); // Red
delay(1000);
my_neopixelWrite(PIN_NEOPIXEL, 0, RGB_BRIGHTNESS, 0); // Green
delay(1000);
my_neopixelWrite(PIN_NEOPIXEL, 0, 0, RGB_BRIGHTNESS); // Blue
delay(1000);
my_neopixelWrite(PIN_NEOPIXEL, 0, 0, 0); // Off / black
delay(1000);
#endif
} I hope that this may help you. |
Board
ESP32-C6
Device Description
PIN 23 CONNECTED WS2812b.
Hardware Configuration
PIN 23 CONNECTED WS2812b.
Version
other
IDE Name
Arduino IDE
Operating System
MAC OS 14.0
Flash frequency
80 MHZ
PSRAM enabled
yes
Upload speed
921600
Description
I tested the RMT function, to control WS2812b. I tested the code, but, it started to FREEZE on the BOOT.
I try comment all the CODE (clean code), ENABLE "ERASE ALL FLASH BEFORE UPLOAD", and re-upload it. But the CRASH on BOOT continue in LOOP.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: