Closed
Description
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
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
#define BUILTIN_RGBLED_PIN 23
#define NR_OF_LEDS 3
#define NR_OF_ALL_BITS 24*NR_OF_LEDS
//#include "Freenove_WS2812_Lib_for_ESP32.h"
#define CHANNEL 0
//rmt_data_t led_data[NR_OF_ALL_BITS];
//Freenove_ESP32_WS2812 strip = Freenove_ESP32_WS2812(LEDS_COUNT, LEDS_PIN, CHANNEL, TYPE_GRB);
//WS2812B
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(9600);
Serial.println("STARTING");
delay(5000);
/*
if (!rmtInit(BUILTIN_RGBLED_PIN, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000)) {
Serial.println("init sender failed\n");
}
Serial.println("real tick set to: 100ns");
*/
delay(5000);
// initialize digital pin LED_BUILTIN as an output.
//if (!rmtInit(BUILTIN_RGBLED_PIN, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000)) {
// Serial.println("init sender failed\n");
// }
pinMode(15, OUTPUT);
//while (!strip.begin());
//strip.setBrightness(20);
}
// the loop function runs over and over again forever
void loop() {
//loopLedIR_ON_OFF(); // wait for a second
//loopLed();
}
void loopLedIR_ON_OFF()
{
digitalWrite(15, HIGH); // turn the LED on (HIGH is the voltage level)
delay(2000);
Serial.println("ON"); // wait for a second
digitalWrite(15, LOW); // turn the LED off by making the voltage LOW
delay(2000);
Serial.println("OFF");
}
int color[] = { 0x55, 0x11, 0x77 }; // Green Red Blue values
int led_index = 1;
/*
void loopLed()
{
// Init data with only one led ON
int led, col, bit;
int i=0;
for (led=0; led<NR_OF_LEDS; led++) {
for (col=0; col<3; col++ ) {
for (bit=0; bit<8; bit++){
if ( (color[col] & (1<<(7-bit))) && (led == led_index) ) {
led_data[i].level0 = 1;
led_data[i].duration0 = 8;
led_data[i].level1 = 0;
led_data[i].duration1 = 4;
} else {
led_data[i].level0 = 1;
led_data[i].duration0 = 4;
led_data[i].level1 = 0;
led_data[i].duration1 = 8;
}
i++;
}
}
}
// make the led travel in the pannel
if ((++led_index)>=NR_OF_LEDS) {
led_index = 0;
}
// Send the data and wait until it is done
rmtWrite(BUILTIN_RGBLED_PIN, led_data, NR_OF_ALL_BITS, RMT_WAIT_FOR_EVER);
delay(100);
Serial.println("LOOP");
}
*/
Debug Message
14:04:24.612 -> 4087e3e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
14:04:24.643 -> 4087e400: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
14:04:24.643 -> 4087e420: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000002 0x00000000
14:04:24.643 -> 4087e440: 0x60002000 0x00000100 0x00000020 0x4001b1c0 0x70f220d4 0xb0666082 0xb5f6886d 0x00000000
14:04:24.643 -> 4087e460: 0x786a6558 0x00000000 0x00010000 0x200203e9 0x4086c410 0x40875728 0x00000594 0x000000ee
14:04:24.674 -> 4087e480: 0x0000000d 0x00ffff00 0x01000000 0x420038f0 0x7533885e 0x8c5a9bca 0x8a57e948 0x675777fb
14:04:24.674 -> 4087e4a0: 0xefe1f630 0x37537b19 0x8f3a9fa2 0x0a23ea69 0x1abef30c 0x00000000 0x00000000 0x00000000
14:04:24.674 -> 4087e4c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4087e5f0 0x00000101 0x00000002
14:04:24.674 -> 4087e4e0: 0x8c5a9bca 0x8a57e948 0x675777fb 0xefe1f630 0x37537b19 0x8f3a9fa2 0x0a23ea69 0x1abef30c
14:04:24.706 ->
14:04:24.706 ->
14:04:24.706 ->
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.