Description
Board
ESP32-H2-DEV-KIT-N4
Device Description
ESP32-H2-DEV-KIT-N4 from Waveshare, nothing else connected.
Same with custom board ESP32-H2-MINI-1U
Hardware Configuration
No additionnal peripheral connected to dev kit
Version
latest master (checkout manually)
IDE Name
Arduino IDE 2.3.4
Operating System
Windows 11
Flash frequency
16 or 64MHz
PSRAM enabled
no
Upload speed
921600 or 115200
Description
With stock ZigBee examples Zigbee_On_Off_Switch or Zigbee_On_Off_Light :
Continous reboot with Guru Error
Sketch
/**
* @brief This example demonstrates simple Zigbee light bulb.
*
* The example demonstrates how to use Zigbee library to create a end device light bulb.
* The light bulb is a Zigbee end device, which is controlled by a Zigbee coordinator.
*
* Proper Zigbee mode must be selected in Tools->Zigbee mode
* and also the correct partition scheme must be selected in Tools->Partition Scheme.
*
* Please check the README.md for instructions and more detailed description.
*
* Created by Jan Procházka (https://github.com/P-R-O-C-H-Y/)
*/
#ifndef ZIGBEE_MODE_ED
#error "Zigbee end device mode is not selected in Tools->Zigbee mode"
#endif
#include "Zigbee.h"
/* Zigbee light bulb configuration */
#define ZIGBEE_LIGHT_ENDPOINT 10
uint8_t led = RGB_BUILTIN;
uint8_t button = BOOT_PIN;
ZigbeeLight zbLight = ZigbeeLight(ZIGBEE_LIGHT_ENDPOINT);
/********************* RGB LED functions **************************/
void setLED(bool value) {
digitalWrite(led, value);
}
/********************* Arduino functions **************************/
void setup() {
Serial.begin(115200);
// Init LED and turn it OFF (if LED_PIN == RGB_BUILTIN, the rgbLedWrite() will be used under the hood)
pinMode(led, OUTPUT);
digitalWrite(led, LOW);
// Init button for factory reset
pinMode(button, INPUT_PULLUP);
//Optional: set Zigbee device name and model
zbLight.setManufacturerAndModel("Espressif", "ZBLightBulb");
// Set callback function for light change
zbLight.onLightChange(setLED);
//Add endpoint to Zigbee Core
Serial.println("Adding ZigbeeLight endpoint to Zigbee Core");
Zigbee.addEndpoint(&zbLight);
// When all EPs are registered, start Zigbee. By default acts as ZIGBEE_END_DEVICE
if (!Zigbee.begin()) {
Serial.println("Zigbee failed to start!");
Serial.println("Rebooting...");
ESP.restart();
}
Serial.println("Connecting to network");
while (!Zigbee.connected()) {
Serial.print(".");
delay(100);
}
Serial.println();
}
void loop() {
// Checking button for factory reset
if (digitalRead(button) == LOW) { // Push button pressed
// Key debounce handling
delay(100);
int startTime = millis();
while (digitalRead(button) == LOW) {
delay(50);
if ((millis() - startTime) > 3000) {
// If key pressed for more than 3secs, factory reset Zigbee and reboot
Serial.println("Resetting Zigbee to factory and rebooting in 1s.");
delay(1000);
Zigbee.factoryReset();
}
}
// Toggle light by pressing the button
zbLight.setLight(!zbLight.getLightState());
}
delay(100);
}
Debug Message
ELF file SHA256: f3b0bf008
Rebooting...
ESP-ROM:esp32h2-20221101
Build:Nov 1 2022
rst:0xc (SW_CPU),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x400031b6
SPIWP:0xee
mode:DIO, clock div:1
load:0x408460e0,len:0x11c4
load:0x4083cad0,len:0xe30
load:0x4083efd0,len:0x2dec
entry 0x4083cad0
[ 1][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x42005c9c
[ 12][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x42005c60
[ 24][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x42005c24
[ 35][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x42005be8
[ 47][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x42005c9c
[ 58][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x42005c60
[ 69][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x42005c24
[ 81][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x42005be8
[ 92][V][ZigbeeEP.cpp:20] ZigbeeEP(): Endpoint: 10
[ 98][V][ZigbeeLight.cpp:10] ZigbeeLight(): Light endpoint created 10
[ 120][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 23 successfully set to type UART_RX (2) with bus 0x4080d9fc
[ 131][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 24 successfully set to type UART_TX (3) with bus 0x4080d9fc
=========== Before Setup Start ===========
Chip Info:
------------------------------------------
Model : ESP32-H2
Package : 0
Revision : 0.01
Cores : 1
CPU Frequency : 96 MHz
XTAL Frequency : 32 MHz
Features Bitfield : 0x00000050
Embedded Flash : No
Embedded PSRAM : No
2.4GHz WiFi : No
Classic BT : No
BT Low Energy : Yes
IEEE 802.15.4 : Yes
------------------------------------------
INTERNAL Memory Info:
------------------------------------------
Total Size : 242608 B ( 236.9 KB)
Free Bytes : 204996 B ( 200.2 KB)
Allocated Bytes : 32364 B ( 31.6 KB)
Minimum Free Bytes: 204996 B ( 200.2 KB)
Largest Free Block: 192500 B ( 188.0 KB)
------------------------------------------
Flash Info:
------------------------------------------
Chip Size : 4194304 B (4 MB)
Block Size : 65536 B ( 64.0 KB)
Sector Size : 4096 B ( 4.0 KB)
Page Size : 256 B ( 0.2 KB)
Bus Speed : 64 MHz
Bus Mode : QIO
------------------------------------------
Partitions Info:
------------------------------------------
nvs : addr: 0x00009000, size: 20.0 KB, type: DATA, subtype: NVS
otadata : addr: 0x0000E000, size: 8.0 KB, type: DATA, subtype: OTA
app0 : addr: 0x00010000, size: 1280.0 KB, type: APP, subtype: OTA_0
app1 : addr: 0x00150000, size: 1280.0 KB, type: APP, subtype: OTA_1
spiffs : addr: 0x00290000, size: 1408.0 KB, type: DATA, subtype: SPIFFS
coredump : addr: 0x003F0000, size: 64.0 KB, type: DATA, subtype: COREDUMP
------------------------------------------
Software Info:
------------------------------------------
Compile Date/Time : Dec 17 2024 10:03:20
Compile Host OS : windows
ESP-IDF Version : v5.3.2-174-g083aad99cf-dirty
Arduino Version : 3.1.0
------------------------------------------
Board Info:
------------------------------------------
Arduino Board : ESP32H2_DEV
Arduino Variant : esp32h2
Arduino FQBN : esp32:esp32:esp32h2:UploadSpeed=921600,CDCOnBoot=default,FlashFreq=64,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=verbose,EraseFlash=all,JTAGAdapter=default,ZigbeeMode=ed
============ Before Setup End ============
[ 459][V][esp32-hal-uart.c:421] uartBegin(): UART0 baud(115200) Mode(800001c) rxPin(23) txPin(24)
[ 468][V][esp32-hal-uart.c:510] uartBegin(): UART0 not installed. Starting installation
[ 477][V][esp32-hal-uart.c:575] uartBegin(): UART0 initialization done.
[ 483][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type GPIO (1) successfully set to 0x420033f8
[ 495][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 8 successfully set to type GPIO (1) with bus 0x9
[ 505][V][esp32-hal-rmt.c:454] rmtInit(): GPIO 8 - TX MODE - MemSize[48] - Freq=10000000Hz
[ 513][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type RMT_TX (10) successfully set to 0x42004a5e
[ 524][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type RMT_RX (11) successfully set to 0x42004a5e
[ 536][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 8 successfully set to type INIT (0) with bus 0x0
[ 546][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 8 successfully set to type RMT_TX (10) with bus 0x40819280
[ 558][V][esp32-hal-rmt.c:305] _rmtWrite(): GPIO: 8 - Request: 24 RMT Symbols - Blocking - Timeout: -1
[ 567][V][esp32-hal-rmt.c:306] _rmtWrite(): GPIO: 8 - Currently in Loop Mode: [NO] | Asked to Loop: NO, LoopCancel: NO
[ 578][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type GPIO (1) successfully set to 0x420033f8
[ 589][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 9 successfully set to type GPIO (1) with bus 0xa
Adding ZigbeeLight endpoint to Zigbee Core
[ 599][D][ZigbeeCore.cpp:84] addEndpoint(): Endpoint: 10, Device ID: 0x0100
[ 610][D][ZigbeeCore.cpp:123] zigbeeInit(): Initialize Zigbee stack
Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.
Core 0 register dump:
MEPC : 0x400195f2 RA : 0x4080c79e SP : 0x4081d1e0 GP : 0x4080e004
TP : 0x4081d4a0 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000001 S1 : 0x00000011 A0 : 0x00000000 A1 : 0xffffffff
A2 : 0x00000001 A3 : 0x7f7f7f7f A4 : 0x00000000 A5 : 0x00000004
A6 : 0x0000000c A7 : 0x76757473 S2 : 0x000000b6 S3 : 0x4081d210
S4 : 0x4081d228 S5 : 0x00000000 S6 : 0x0009511c S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40800001 MCAUSE : 0x00000005 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
4081d1e0: 0x00000001 0x00000804 0x0000005c 0x00000000 0x00000000 0x00000000 0x40822714 0x40800030
4081d200: 0x00000804 0x4080f4a0 0x4080f49c 0x4080f4b0 0x00000000 0x4080f4b4 0x4081d1fc 0x4080f4b8
4081d220: 0x00000000 0x4080f13c 0x00000000 0x00000000 0x00000000 0x65737361 0x66207472 0x656c6961
4081d240: 0x08203a64 0x00000020 0x00000002 0x4081d524 0x00000004 0x00000000 0x408158bc 0x4080697e
4081d260: 0x0009511c 0x00000000 0x00000000 0x408074a4 0x40822778 0x40850000 0x40814b30 0xffffffff
4081d280: 0x0009511c 0x00000000 0x00000002 0x4000af90 0x40814b30 0x00000000 0x4081b104 0x4080697e
4081d2a0: 0x00000000 0x00000000 0x4081b104 0x40806f06 0x0009511c 0x420706f8 0x00000000 0x4000af90
4081d2c0: 0x40850000 0x40822778 0x40814b30 0x4000b0c2 0x40815000 0x40822780 0x40814b30 0x4000af90
4081d2e0: 0x40815000 0x00000000 0x40822780 0x4203e7d6 0x42078000 0x420706f8 0x00000000 0xd980783b
4081d300: 0x42078000 0x420706f8 0x00000000 0x4080ff68 0x42078000 0x40811f68 0x40810000 0x4203c628
4081d320: 0x00000002 0x0000000a 0x40810000 0x420147b2 0x420057f4 0x42071000 0x4080f970 0x4081d430
4081d340: 0x42070000 0x42071000 0x4081d430 0x420093f6 0x4207134c 0x93000000 0x4080f970 0x42001b0e
4081d360: 0x00000004 0x00000008 0x00000002 0x00000000 0x00000010 0x00000007 0x0000004f 0x0000004f
4081d380: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4081d3a0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4081d3c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4081d3e0: 0x00000000 0x00001800 0x00000006 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4081d400: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4080f970 0x42001d5a
4081d420: 0x00000000 0x0000000a 0x0001040a 0x00000001 0x00000002 0x00000000 0x00000006 0x00000bb8
4081d440: 0x00000000 0x40810000 0x40810000 0x420000d0 0x00000000 0x40815000 0x42003000 0x42006c80
4081d460: 0x00000000 0x00000000 0x00000000 0x40807aba 0x00000000 0x00000000 0x00000000 0x00000000
4081d480: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4081d4a0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xbaad5678 0x00000168 0xabba1234 0x0000015c
4081d4c0: 0x4081d1b0 0x000001bd 0x40812ab0 0x40812ab0 0x4081d4c0 0x40812aa8 0x00000018 0x408192c8
4081d4e0: 0x408192c8 0x4081d4c0 0x00000000 0x00000001 0x4081b4b0 0x706f6f6c 0x6b736154 0x00000000
4081d500: 0x00000000 0x4081d4a0 0x00000005 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000
4081d520: 0x000573de 0x00000000 0x408156a0 0x40815708 0x40815770 0x00000000 0x00000000 0x00000001
4081d540: 0x00000000 0x00000000 0x4081d62c 0x42046868 0x00000000 0x00000000 0x00000000 0x00000000
4081d560: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4081d580: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4081d5a0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4081d5c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
ELF file SHA256: f3b0bf008
Rebooting...
Other Steps to Reproduce
-
Tried on another identical HW board
-
Same error with custom board on H2-MINI-1 chip.
-
Tried downgrading to 3.0.0, 3.0.6 lib and last 3.1.0 release
-
Tried removing Arduino IDE and cleaning lib folder and fresh install.
-
Tried setting 2MB and 4MB memory with Minimal or Default partition schemes
-
Tried Setting flash to 16 or 64MHz, QIO or DIO
-
Erase flash before upload enabled
-
Tried disabling CDC on boot
-
Can't run [ExceptionDecoder]: does not show in Arduino IDE after unzipping in sketches/tool folder.
Examples and custom code based on examples were working fine in november '24 (don't remember precisely lib version at this time, 3.0.5 or 3.0.6)
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.