ESP32 chip info tool for WLED_DEBUG
This is a nice little chip info tool that I've created some time ago. When building with `-D WLED_DEBUG`, it reports some interesting information about your ESP32 on serial monitor. ```` ==================================== Chip info for ESP32-D0WDQ5 SDK: v4.4.1-472-gc9140caf8c ------------------------------------ XTAL FREQ: 40 MHz APB FREQ: 80.0 MHz CPU FREQ: 240 MHz ESP32 DEVICE: ESP32-D0WD-V3 rev.3, 2 core(s), 240MHz. Chip feature flags: 0b110010 * 0b0000010 Chip has 2.4GHz WiFi * 0b0001000 Chip has Bluetooth LE * 0b0010000 Chip has Bluetooth Classic FLASH CHIP FREQ (magic): 80.0 MHz FLASH SIZE (magic byte): 4.00 MB FLASH MODE (magic byte): 2 ; 0=QIO, 1=QOUT, 2=DIO, 3=DOUT or other FLASH CHIP ID: 0x16405E FLASH CHIP FREQ: 80.0 MHz FLASH REAL SIZE: 4.00 MB FLASH REAL MODE: DIO ------------------------------------ RAM HEAP SIZE: 261.79 KB FREE RAM: 232.57 KB MAX RAM alloc: 107.99 KB ESP32 PSRAM: found. * SPI RAM Chip availeable: 64MBits = 8MBytes total PSRAM: 4094 KB FREE PSRAM: 4093.89 KB MAX PSRAM alloc:4031.99 KB used PSRAM: 0 Bytes * PSRAM free after malloc / ps_malloc : 2833.85 KB * Can allocate big memory with ps_malloc() * Can allocate big memory with malloc() CPU #0 - last reset reason = 1 POWERON_RESET => Vbat power on reset CPU #1 - last reset reason = 14 EXT_CPU_RESET => APP CPU reset by PRO CPU ==================================== ````
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
#include "soc/rtc_cntl_reg.h"
|
||||
#endif
|
||||
|
||||
#if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32)
|
||||
#include "../tools/ESP32-Chip_info.hpp"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Main WLED class implementation. Mostly initialization and connection logic
|
||||
*/
|
||||
@@ -188,10 +192,13 @@ void WLED::loop()
|
||||
DEBUG_PRINT(F("Free heap: ")); DEBUG_PRINTLN(ESP.getFreeHeap());
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
if (psramFound()) {
|
||||
DEBUG_PRINT(F("Total PSRAM: ")); DEBUG_PRINT(ESP.getPsramSize()/1024); DEBUG_PRINTLN("kB");
|
||||
DEBUG_PRINT(F("Free PSRAM: ")); DEBUG_PRINT(ESP.getFreePsram()/1024); DEBUG_PRINTLN("kB");
|
||||
} else
|
||||
DEBUG_PRINTLN(F("No PSRAM"));
|
||||
//DEBUG_PRINT(F("Total PSRAM: ")); DEBUG_PRINT(ESP.getPsramSize()/1024); DEBUG_PRINTLN("kB");
|
||||
DEBUG_PRINT(F("Free PSRAM: ")); DEBUG_PRINT(ESP.getFreePsram()/1024); DEBUG_PRINTLN("kB");
|
||||
DEBUG_PRINT(F("PSRAM in use:")); DEBUG_PRINT(ESP.getPsramSize() - ESP.getFreePsram()); DEBUG_PRINTLN(F(" Bytes"));
|
||||
|
||||
} else {
|
||||
//DEBUG_PRINTLN(F("No PSRAM"));
|
||||
}
|
||||
#endif
|
||||
DEBUG_PRINT(F("Wifi state: ")); DEBUG_PRINTLN(WiFi.status());
|
||||
|
||||
@@ -274,6 +281,10 @@ void WLED::setup()
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
DEBUG_PRINT(F("esp32 "));
|
||||
DEBUG_PRINTLN(ESP.getSdkVersion());
|
||||
|
||||
#if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32)
|
||||
showRealSpeed();
|
||||
#endif
|
||||
#else
|
||||
DEBUG_PRINT(F("esp8266 "));
|
||||
DEBUG_PRINTLN(ESP.getCoreVersion());
|
||||
|
||||
Reference in New Issue
Block a user