New ESP32 audio board for ESPuino

This is my first draft board layout



updated schematics
Schematic_2506-loud-esp-g-espuino-edition_2025-07-02.pdf (312,8 KB)

Took me some time, but I think I’m finished with routing now. Going to let it cool down over the weekend and place a factory order next week for a test batch. I’d appreciate it if any of you could help me test the board. In the end, I’d like to open-source the final design and donate it to the community, basically, while I plan to keep it in production for anyone interested in a ready-to-use kit.




4 „Gefällt mir“

Hey folks, I finally have the board on the desk. Doing some basic testing, at this point on ESPHome (simpler for me)

  • RGB LEDs work (12x)
  • SD card read/write works
  • NFC (RC522) works fine
  • GPIO expander - detected on the bus (0x20), but no input changes, perhaps ESPhome bug or i’m mising something
  • DAC works well
  • Battery charging and power status - OK, battery voltage read - OK
  • Power button - works well, by default device is on, when pressed for around 3 seconds - goes off.
  • Rotary works well.
  • The only hardware issue found so far - when battery connected, flashing not working with USB-C, bootloop. Wierd… Without battery it works every time. With battery works with OTA. Not critical, will have a look later.

I’m trying to configure ESPuino for next test, but getting bootloop, any ideas what do I miss? Something with the sdcard (it is instered and formatted to FAT32 i think)?

entry 0x400805f0
E (616) esp_core_dump_flash: No core dump partition found!
E (616) esp_core_dump_flash: No core dump partition found!
I [120] Restored maximum inactivity-time from NVS: 10 minutes
[   120][E][Preferences.cpp:354] getUChar(): nvs_get_u8 fail: operationMode NOT_FOUND
D [184] RFID-tags can now be applied...
E [184] Unable to detect port-expander
[   184][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
N [198] Enabled interrupt-handling for port-expander
[   198][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
I [210] Restored interval of battery-measurement or Neopixel-display from NVS: 10 minutes
I [211] Restored lower voltage-level for Neopixel-display from NVS: 3.00V
I [223] Restored upper voltage-level for Neopixel-display from NVS: 4.20V
I [224] Restored low battery-voltage-level for warning via Neopixel from NVS: 3.40V
I [236] Restored critical battery-voltage-level for warning via Neopixel from NVS: 3.10V
[   236][E][Preferences.cpp:406] getUInt(): nvs_get_u32 fail: playTimeTotal NOT_FOUND
[   253][E][Preferences.cpp:354] getUChar(): nvs_get_u8 fail: PLSortMode NOT_FOUND
I [261] Restored initial volume from NVS: 3
E [262] Wrote maximum volume for speaker to NVS.
N [262] Loudspeaker on
[   264][E][Preferences.cpp:341] getChar(): nvs_get_i8 fail: gainLowPass NOT_FOUND
[   279][E][Preferences.cpp:341] getChar(): nvs_get_i8 fail: gainBandPass NOT_FOUND
[   286][E][Preferences.cpp:341] getChar(): nvs_get_i8 fail: gainHighPass NOT_FOUND
I [344] Restoring initial LED-brightness from NVS: 16
I [344] Restored LED-brightness for nightmode from NVS: 2
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40094d88  PS      : 0x00060333  A0      : 0x80095936  A1      : 0x3ffb2040  
  #0  0x40094d88 in block_size at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf_block_functions.h:74
      (inlined by) block_locate_free at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:441
      (inlined by) tlsf_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:850

A2      : 0x3f800014  A3      : 0xffffffff  A4      : 0xfffffffc  A5      : 0x00060123  
A6      : 0x00060120  A7      : 0x00000001  A8      : 0x0000001f  A9      : 0x0000000f  
A10     : 0x405816f0  A11     : 0x00000168  A12     : 0x3f800038  A13     : 0x3f800078  
A14     : 0x00060323  A15     : 0x00000000  SAR     : 0x0000001d  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000003  LBEG    : 0x4008c999  LEND    : 0x4008c9bb  LCOUNT  : 0xffffffff  


Backtrace: 0x40094d85:0x3ffb2040 0x40095933:0x3ffb2060 0x40095aa4:0x3ffb2080 0x40086170:0x3ffb20a0 0x400861c4:0x3ffb20d0 0x40095e89:0x3ffb20f0 0x401e45b0:0x3ffb2110 0x40147685:0x3ffb2130 0x40130681:0x3ffb2150 0x400ea4c7:0x3ffb2180 0x400dacba:0x3ffb2210 0x400e95ea:0x3ffb2230 0x40136bba:0x3ffb2290
  #0  0x40094d85 in block_locate_free at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:439
      (inlined by) tlsf_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:850
  #1  0x40095933 in multi_heap_malloc_impl at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/multi_heap.c:187
  #2  0x40095aa4 in multi_heap_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/multi_heap_poisoning.c:234
      (inlined by) multi_heap_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/multi_heap_poisoning.c:223
  #3  0x40086170 in heap_caps_malloc_base at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_caps.c:175
      (inlined by) heap_caps_malloc_base at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_caps.c:120
  #4  0x400861c4 in heap_caps_malloc_default at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_caps.c:230
  #5  0x40095e89 in malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/newlib/heap.c:24
  #6  0x401e45b0 in xQueueGenericCreate at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/freertos/queue.c:447
  #7  0x40147685 in sdmmc_host_init at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/driver/sdmmc_host.c:305
  #8  0x40130681 in esp_vfs_fat_sdmmc_mount at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/fatfs/vfs/vfs_fat_sdmmc.c:226
  #9  0x400ea4c7 in fs::SDMMCFS::begin(char const*, bool, bool, int, unsigned char) at /home/andriy/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src/SD_MMC.cpp:139
  #10 0x400dacba in SdCard_Init() at /home/andriy/prj/loud-esp-espuino/ESPuino/src/SdCard.cpp:31
  #11 0x400e95ea in setup() at /home/andriy/prj/loud-esp-espuino/ESPuino/src/main.cpp:180
  #12 0x40136bba in loopTask(void*) at /home/andriy/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:42

1 „Gefällt mir“

Here are my configs
platformio.ini config

[env:loud-esp-espuino]
board = lolin_d32_pro
board_build.partitions = custom_8mb_ota.csv
build_flags = ${env.build_flags}
              -DHAL=99
              -DBOARD_HAS_PSRAM
              -mfix-esp32-psram-cache-issue
              -DLOG_BUFFER_SIZE=10240
;board_upload.maximum_size = 8388608
board_upload.flash_size = 8MB

settings.h

// clang-format off

#ifndef __ESPUINO_SETTINGS_H__
    	#define __ESPUINO_SETTINGS_H__
        #include "Arduino.h"
        #include "values.h"
#if __has_include("settings-override.h")
    	#include "settings-override.h"
#else
	//######################### INFOS ####################################
	// This is the general configfile for ESPuino-configuration.

	//################## HARDWARE-PLATFORM ###############################
	/* Make sure to also edit the configfile, that is specific for your platform.
	If in doubts (your develboard is not listed) use HAL 1
	1: Wemos Lolin32                        => settings-lolin32.h
	2: ESP32-A1S Audiokit                   => settings-espa1s.h
	3: Wemos Lolin D32                      => settings-lolin_D32.h
	4: Wemos Lolin D32 pro                  => settings-lolin_D32_pro.h
	5: Lilygo T8 (V1.7)                     => settings-ttgo_t8.h
	6: ESPuino complete                     => settings-complete.h
	7: Lolin D32 pro SDMMC Port-Expander    => settings-lolin_d32_pro_sdmmc_pe.h
	8: AZDelivery ESP32 NodeMCU             => settings-azdelivery_sdmmc.h
	9: Lolin D32 SDMMC Port-Expander        => settings-lolin_d32_sdmmc_pe.h
	99: custom                              => settings-custom.h
	more to come...
	*/
	#ifndef HAL             // Will be set by platformio.ini. If using Arduino-IDE you have to set HAL according your needs!
		#define HAL 1       // HAL 1 = LoLin32, 2 = ESP32-A1S-AudioKit, 3 = Lolin D32, 4 = Lolin D32 pro; ... 99 = custom
	#endif


	//########################## MODULES #################################
	#define PORT_EXPANDER_ENABLE          // When enabled, buttons can be connected via port-expander PCA9555 (https://forum.espuino.de/t/einsatz-des-port-expanders-pca9555/306)
	//#define I2S_COMM_FMT_LSB_ENABLE       // Enables FMT instead of MSB for I2S-communication-format. Used e.g. by PT2811. Don't enable for MAX98357a, AC101 or PCM5102A)
	#define MDNS_ENABLE                     // When enabled, you don't have to handle with ESPuino's IP-address. If hostname is set to "ESPuino", you can reach it via ESPuino.local
	//#define MQTT_ENABLE                   // Make sure to configure mqtt-server and (optionally) username+pwd
	#define FTP_ENABLE                      // Enables FTP-server; DON'T FORGET TO ACTIVATE AFTER BOOT BY PRESSING PAUSE + NEXT-BUTTONS (IN PARALLEL)!
	#define NEOPIXEL_ENABLE                 // Don't forget configuration of NUM_LEDS if enabled
	//#define NEOPIXEL_REVERSE_ROTATION     // Some Neopixels are adressed/soldered counter-clockwise. This can be configured here.
	#define LANGUAGE EN                     // DE = deutsch; EN = english
	//#define STATIC_IP_ENABLE              // DEPRECATED: Enables static IP-configuration (change static ip-section accordingly)
	//#define HEADPHONE_ADJUST_ENABLE         // Used to adjust (lower) volume for optional headphone-pcb (refer maxVolumeSpeaker / maxVolumeHeadphone) and to enable stereo (if PLAY_MONO_SPEAKER is set)
	//#define PLAY_MONO_SPEAKER             // If only one speaker is used enabling mono should make sense. Please note: headphones is always stereo (if HEADPHONE_ADJUST_ENABLE is active)
	#define SHUTDOWN_IF_SD_BOOT_FAILS       // Will put ESP to deepsleep if boot fails due to SD. Really recommend this if there's in battery-mode no other way to restart ESP! Interval adjustable via deepsleepTimeAfterBootFails.
	#define MEASURE_BATTERY_VOLTAGE       // Enables battery-measurement via GPIO (ADC) and voltage-divider
	//#define MEASURE_BATTERY_MAX17055      // Enables battery-measurement via external fuel gauge (MAX17055)
	//#define SHUTDOWN_ON_BAT_CRITICAL      // Whether to turn off on critical battery-level (only used if MEASURE_BATTERY_XXX is active)
	//#define PLAY_LAST_RFID_AFTER_REBOOT   // When restarting ESPuino, the last RFID that was active before, is recalled and played
	//#define USE_LAST_VOLUME_AFTER_REBOOT  // Remembers the volume used at last shutdown after reboot
	#define USEROTARY_ENABLE              // If rotary-encoder is used (don't forget to review WAKEUP_BUTTON if you disable this feature!)
	//#define BLUETOOTH_ENABLE              // If enabled and bluetooth-mode is active, you can stream to your ESPuino or to a headset via bluetooth (a2dp-sink & a2dp-source). Note: This feature consumes a lot of resources and the available flash/ram might not be sufficient.
	#define IR_CONTROL_ENABLE               // Enables remote control (https://forum.espuino.de/t/neues-feature-fernsteuerung-per-infrarot-fernbedienung/265)
	//#define PAUSE_WHEN_RFID_REMOVED       // Playback starts when card is applied and pauses automatically, when card is removed (https://forum.espuino.de/t/neues-feature-pausieren-wenn-rfid-karte-entfernt-wurde/541)
	//#define PAUSE_ON_MIN_VOLUME           // When playback is active and volume is changed to zero, playback is paused automatically. Playback is continued if volume reaches 1. (https://forum.espuino.de/t/neues-feature-pausieren-wenn-rfid-karte-entfernt-wurde/541)
	//#define DONT_ACCEPT_SAME_RFID_TWICE   // RFID-reader doesn't accept the same RFID-tag twice in a row (unless it's a modification-card or RFID-tag is unknown in NVS). Flag will be ignored silently if PAUSE_WHEN_RFID_REMOVED is active. (https://forum.espuino.de/t/neues-feature-dont-accept-same-rfid-twice/1247)
	//#define SAVE_PLAYPOS_BEFORE_SHUTDOWN  // When playback is active and mode audiobook was selected, last play-position is saved automatically when shutdown is initiated
	//#define SAVE_PLAYPOS_WHEN_RFID_CHANGE // When playback is active and mode audiobook was selected, last play-position is saved automatically for old playlist when new RFID-tag is applied
	//#define HALLEFFECT_SENSOR_ENABLE      // Support for hallsensor. For fine-tuning please adjust HallEffectSensor.h Please note: only user-support provided (https://forum.espuino.de/t/magnetische-hockey-tags/1449/35)
	#define VOLUMECURVE 0 					// 0=square, 1=logarithmic (1 is more flatten at lower volume)

	//################## set PAUSE_WHEN_RFID_REMOVED behaviour #############################
	#ifdef PAUSE_WHEN_RFID_REMOVED
		#define ACCEPT_SAME_RFID_AFTER_TRACK_END           // Accepts same RFID after playback has ended (https://forum.espuino.de/t/neues-feature-pausieren-wenn-rfid-karte-entfernt-wurde/541/2)
	#endif

	//################## select SD card mode #############################
	#define SD_MMC_1BIT_MODE                // run SD card in SD-MMC 1Bit mode (using GPIOs 15 + 14 + 2 is mandatory!)
	//#define SINGLE_SPI_ENABLE             // If only one SPI-instance should be used instead of two (not yet working!)
	//#define NO_SDCARD                     // enable to start without any SD card, e.g. for a webplayer only. SD card Settings above will be ignored


	//################## select RFID reader ##############################
	#define RFID_READER_TYPE_MFRC522_SPI    // use MFRC522 via SPI
	//#define RFID_READER_TYPE_MFRC522_I2C  // use MFRC522 via I2C
	//#define RFID_READER_TYPE_PN5180       // use PN5180 via SPI

	#ifdef RFID_READER_TYPE_MFRC522_I2C
		#define MFRC522_ADDR 0x28           // default I2C-address of MFRC522
	#endif

	#ifdef RFID_READER_TYPE_PN5180
		//#define PN5180_ENABLE_LPCD        // Wakes up ESPuino if RFID-tag was applied while deepsleep is active.
	#endif

	#if defined(RFID_READER_TYPE_MFRC522_I2C) || defined(RFID_READER_TYPE_MFRC522_SPI)
		constexpr uint8_t rfidGain = 0x07 << 4;      // Sensitivity of RC522. For possible values see reference: https://forum.espuino.de/uploads/default/original/1X/9de5f8d35cbc123c1378cad1beceb3f51035cec0.png
	#endif


	//############# Port-expander-configuration ######################
	#ifdef PORT_EXPANDER_ENABLE
		constexpr uint8_t expanderI2cAddress = 0x20;  // I2C-address of PCA9555 (0x20 is true if PCA's pins A0+A1+A2 are pulled to GND)
	#endif

	//################## BUTTON-Layout ##################################
	/* German documentation: https://forum.espuino.de/t/das-dynamische-button-layout/224
	Please note the following numbers as you need to know them in order to define actions for buttons.
	Even if you don't use all of them, their numbers won't change
		0: NEXT_BUTTON
		1: PREVIOUS_BUTTON
		2: PAUSEPLAY_BUTTON
		3: ROTARYENCODER_BUTTON
		4: BUTTON_4
		5: BUTTON_5

	Don't forget to enable/configure those buttons you want to use in your develboard-specific config (e.g. settings-custom.h)

	Single-buttons [can be long or short] (examples):
		BUTTON_0_SHORT => Button 0 (NEXT_BUTTON) pressed shortly
		BUTTON_3_SHORT => Button 3 (ROTARYENCODER_BUTTON) pressed shortly
		BUTTON_4_LONG => Button 4 (BUTTON_4) pressed long

	Multi-buttons [short only] (examples):
		BUTTON_MULTI_01 => Buttons 0+1 (NEXT_BUTTON + PREVIOUS_BUTTON) pressed in parallel
		BUTTON_MULTI_12 => Buttons 1+2 (PREV_BUTTON + PAUSEPLAY_BUTTON) pressed in parallel

	Actions:
		To all of those buttons, an action can be assigned freely.
		Please have a look at values.h to look up actions available (>=100 can be used)
		If you don't want to assign an action or you don't use a given button: CMD_NOTHING has to be set
	*/
	// *****BUTTON*****        *****ACTION*****
	#define BUTTON_0_SHORT    CMD_NEXTTRACK
	#define BUTTON_1_SHORT    CMD_PREVTRACK
	#define BUTTON_2_SHORT    CMD_PLAYPAUSE
	#define BUTTON_3_SHORT    CMD_MEASUREBATTERY
	#define BUTTON_4_SHORT    CMD_SEEK_BACKWARDS
	#define BUTTON_5_SHORT    CMD_SEEK_FORWARDS

	#define BUTTON_0_LONG     CMD_LASTTRACK
	#define BUTTON_1_LONG     CMD_FIRSTTRACK
	#define BUTTON_2_LONG     CMD_PLAYPAUSE
	#define BUTTON_3_LONG     CMD_SLEEPMODE
	#define BUTTON_4_LONG     CMD_VOLUMEUP
	#define BUTTON_5_LONG     CMD_VOLUMEDOWN

	#define BUTTON_MULTI_01   CMD_NOTHING   //CMD_TOGGLE_WIFI_STATUS (disabled now to prevent children from unwanted WiFi-disable)
	#define BUTTON_MULTI_02   CMD_ENABLE_FTP_SERVER
	#define BUTTON_MULTI_03   CMD_NOTHING
	#define BUTTON_MULTI_04   CMD_NOTHING
	#define BUTTON_MULTI_05   CMD_NOTHING
	#define BUTTON_MULTI_12   CMD_TELL_IP_ADDRESS
	#define BUTTON_MULTI_13   CMD_NOTHING
	#define BUTTON_MULTI_14   CMD_NOTHING
	#define BUTTON_MULTI_15   CMD_NOTHING
	#define BUTTON_MULTI_23   CMD_NOTHING
	#define BUTTON_MULTI_24   CMD_NOTHING
	#define BUTTON_MULTI_25   CMD_NOTHING
	#define BUTTON_MULTI_34   CMD_NOTHING
	#define BUTTON_MULTI_35   CMD_NOTHING
	#define BUTTON_MULTI_45   CMD_NOTHING

	//#################### Various settings ##############################

	// Serial-logging-configuration
	#define SERIAL_LOGLEVEL LOGLEVEL_DEBUG              // Current loglevel for serial console

    // DEPRECATED: This is now done using dynamic network configuration.
    //              If left, it is used for the automatic migration exactly once
	// Static ip-configuration
	#ifdef STATIC_IP_ENABLE
		#define LOCAL_IP   192,168,2,100                // ESPuino's IP
		#define GATEWAY_IP 192,168,2,1                  // IP of the gateway/router
		#define SUBNET_IP  255,255,255,0                // Netmask of your network (/24 => 255.255.255.0)
		#define DNS_IP     192,168,2,1                  // DNS-server of your network; in private networks it's usually the gatewy's IP
	#endif

	// Buttons (better leave unchanged if in doubts :-))
	constexpr uint8_t buttonDebounceInterval = 50;                // Interval in ms to software-debounce buttons
	constexpr uint16_t intervalToLongPress = 700;                 // Interval in ms to distinguish between short and long press of buttons

	// Buttons active state: Default 0 for active LOW, 1 for active HIGH e.g. for TTP223 Capacitive Touch Switch Button (FinnBox)
	#define BUTTON_0_ACTIVE_STATE 0
	#define BUTTON_1_ACTIVE_STATE 0
	#define BUTTON_2_ACTIVE_STATE 0
	#define BUTTON_3_ACTIVE_STATE 0
	#define BUTTON_4_ACTIVE_STATE 0
	#define BUTTON_5_ACTIVE_STATE 0

	//#define CONTROLS_LOCKED_BY_DEFAULT			// If set the controls are locked at boot
	#define INCLUDE_ROTARY_IN_CONTROLS_LOCK			// If set the rotary encoder is locked if controls are locked

	// RFID-RC522
	#define RFID_SCAN_INTERVAL 100                      // Interval-time in ms (how often is RFID read?)

	// Automatic restart
	#ifdef SHUTDOWN_IF_SD_BOOT_FAILS
		constexpr uint32_t deepsleepTimeAfterBootFails = 20;      // Automatic restart takes place if boot was not successful after this period (in seconds)
	#endif

	// FTP
	// Nothing to be configured here...
	// Default user/password is esp32/esp32 but can be changed via webgui

	// timezone
	// see list of valid timezones: https://github.com/nayarsystems/posix_tz_db/blob/fb5fa340cfa7599467358a347e5d6e6724d92bb2/zones.csv
	// example for Europe/Berlin:	"CET-1CEST,M3.5.0,M10.5.0/3"
	// example for America/Toronto:	"EST5EDT,M3.2.0,M11.1.0"
	constexpr const char timeZone[] = "CET-1CEST,M3.5.0,M10.5.0/3"; // Europe/Berlin

	// ESPuino will create a WiFi if joing existing WiFi was not possible. Name and password can be configured here.
	constexpr const char accessPointNetworkSSID[] = "ESPuino";     // Access-point's SSID
	constexpr const char accessPointNetworkPassword[] = "";        // Access-point's Password, at least 8 characters! Set to an empty string to spawn an open WiFi.

	// Bluetooth
	constexpr const char nameBluetoothSinkDevice[] = "ESPuino";        // Name of your ESPuino as Bluetooth-device

	// Where to store the backup-file for NVS-records
	constexpr const char backupFile[] = "/backup.txt"; // File is written every time a (new) RFID-assignment via GUI is done

	//#################### Settings for optional Modules##############################
	// (optinal) Neopixel
	#ifdef NEOPIXEL_ENABLE
		#define NUM_INDICATOR_LEDS		12     	// number of Neopixel LEDs (formerly NUM_LEDS)
		#define NUM_CONTROL_LEDS		0		// optional control leds (https://forum.espuino.de/t/statische-ws2812-leds/1703)
		#define CONTROL_LEDS_COLORS		{}		// Colors for the control LEDs. Make sure it lists at least NUM_CONTROL_LEDS colors, e.g. for three control LEDs define: CONTROL_LEDS_COLORS {CRGB::Yellow, CRGB::Blue, 0xFFFFFF} (predefined colors: http://fastled.io/docs/3.1/struct_c_r_g_b.html)
		#define CHIPSET					WS2812B     	// type of Neopixel
		#define COLOR_ORDER				GRB
		#define NUM_LEDS_IDLE_DOTS		1           	// count of LEDs, which are shown when Idle
		#define OFFSET_PAUSE_LEDS		false		// if true the pause-leds are centered in the mid of the LED-Strip
		#define PROGRESS_HUE_START		85          	// Start and end hue of mulitple-LED progress indicator. Hue ranges from basically 0 - 255, but you can also set numbers outside this range to get the desired effect (e.g. 85-215 will go from green to purple via blue, 341-215 start and end at exactly the same color but go from green to purple via yellow and red)
		#define PROGRESS_HUE_END		-1
		#define DIMMABLE_STATES			50		// Number of dimmed values between two full LEDs (https://forum.espuino.de/t/led-verbesserungen-rework/1739)
		//#define LED_OFFSET                		0           	// shifts the starting LED in the original direction of the neopixel ring
	#endif

	#if defined(MEASURE_BATTERY_VOLTAGE) || defined(MEASURE_BATTERY_MAX17055)
		#define BATTERY_MEASURE_ENABLE                 // Don't change. Set automatically if any method of battery monitoring is selected.
		constexpr uint8_t s_batteryCheckInterval = 10; // How often battery is measured (in minutes) (can be changed via GUI!)
	#endif

	#ifdef MEASURE_BATTERY_VOLTAGE
		// (optional) Default-voltages for battery-monitoring via Neopixel; can be changed later via WebGUI
		constexpr float s_warningLowVoltage = 3.4;                      // If battery-voltage is <= this value, a cyclic warning will be indicated by Neopixel (can be changed via GUI!)
		constexpr float s_warningCriticalVoltage = 3.1;                 // If battery-voltage is <= this value, assume battery near-empty. Set to 0V to disable.
		constexpr float s_voltageIndicatorLow = 3.0;                    // Lower range for Neopixel-voltage-indication (0 leds) (can be changed via GUI!)
		constexpr float s_voltageIndicatorHigh = 4.2;                   // Upper range for Neopixel-voltage-indication (all leds) (can be changed via GUI!)
	#endif

	#ifdef MEASURE_BATTERY_MAX17055
		constexpr float s_batteryLow = 15.0;            // low percentage
		constexpr float s_batteryCritical = 5.0;        // critical percentage

		constexpr uint16_t s_batteryCapacity = 6000;    // design cap of battery (mAh)
		constexpr uint16_t s_emptyVoltage = 300;        // empty voltage in 10mV
		constexpr uint16_t s_recoveryVoltage = 360;     // recovery voltage in 10mV
		constexpr uint8_t  s_batteryChemistry = 0x60;   // 0 = Li-Ion, 0x20 = NCR, 0x60 = LiFePO4
		constexpr float s_resistSensor = 0.01;          // current sense resistor, currently non-default values might lead to problems
		constexpr bool s_vCharge = false;                   // true if charge voltage is greater than 4.275V
	#endif

	// enable I2C if necessary
	#if defined(RFID_READER_TYPE_MFRC522_I2C) || defined(PORT_EXPANDER_ENABLE) || defined(MEASURE_BATTERY_MAX17055)
		#define I2C_2_ENABLE
	#endif

	// (optinal) Headphone-detection (leave unchanged if in doubts...)
	#ifdef HEADPHONE_ADJUST_ENABLE
		constexpr uint16_t headphoneLastDetectionDebounce = 1000; // Debounce-interval in ms when plugging in headphone
	#endif

	// Seekmode-configuration
	constexpr uint8_t jumpOffset = 30;                            // Offset in seconds to jump for commands CMD_SEEK_FORWARDS / CMD_SEEK_BACKWARDS

	// (optional) Topics for MQTT
	#ifdef MQTT_ENABLE
		constexpr uint16_t mqttRetryInterval = 60;                // Try to reconnect to MQTT-server every (n) seconds if connection is broken
		constexpr uint8_t mqttMaxRetriesPerInterval = 1;          // Number of retries per time-interval (mqttRetryInterval). mqttRetryInterval 60 / mqttMaxRetriesPerInterval 1 => once every 60s
		#define DEVICE_HOSTNAME "ESP32-ESPuino"         // Name that is used for MQTT
		constexpr const char topicSleepCmnd[] = "Cmnd/ESPuino/Sleep";
		constexpr const char topicSleepState[] = "State/ESPuino/Sleep";
		constexpr const char topicRfidCmnd[] = "Cmnd/ESPuino/Rfid";
		constexpr const char topicRfidState[] = "State/ESPuino/Rfid";
		constexpr const char topicTrackState[] = "State/ESPuino/Track";
		constexpr const char topicTrackControlCmnd[] = "Cmnd/ESPuino/TrackControl";
		constexpr const char topicCoverChangedState[] = "State/ESPuino/CoverChanged";
		constexpr const char topicLoudnessCmnd[] = "Cmnd/ESPuino/Loudness";
		constexpr const char topicLoudnessState[] = "State/ESPuino/Loudness";
		constexpr const char topicSleepTimerCmnd[] = "Cmnd/ESPuino/SleepTimer";
		constexpr const char topicSleepTimerState[] = "State/ESPuino/SleepTimer";
		constexpr const char topicState[] = "State/ESPuino/State";
		constexpr const char topicCurrentIPv4IP[] = "State/ESPuino/IPv4";
		constexpr const char topicLockControlsCmnd[] ="Cmnd/ESPuino/LockControls";
		constexpr const char topicLockControlsState[] ="State/ESPuino/LockControls";
		constexpr const char topicPlaymodeState[] = "State/ESPuino/Playmode";
		constexpr const char topicRepeatModeCmnd[] = "Cmnd/ESPuino/RepeatMode";
		constexpr const char topicRepeatModeState[] = "State/ESPuino/RepeatMode";
		constexpr const char topicLedBrightnessCmnd[] = "Cmnd/ESPuino/LedBrightness";
		constexpr const char topicLedBrightnessState[] = "State/ESPuino/LedBrightness";
		constexpr const char topicWiFiRssiState[] = "State/ESPuino/WifiRssi";
		constexpr const char topicSRevisionState[] = "State/ESPuino/SoftwareRevision";
		#ifdef BATTERY_MEASURE_ENABLE
		constexpr const char topicBatteryVoltage[] = "State/ESPuino/Voltage";
		constexpr const char topicBatterySOC[]     = "State/ESPuino/Battery";
		#endif
	#endif

	// !!! MAKE SURE TO EDIT PLATFORM SPECIFIC settings-****.h !!!
	#if (HAL == 1)
		#include "settings-lolin32.h"                       // Contains all user-relevant settings for Wemos Lolin32
	#elif (HAL == 2)
		#include "settings-espa1s.h"                        // Contains all user-relevant settings for ESP32-A1S Audiokit
	#elif (HAL == 3)
		#include "settings-lolin_d32.h"                     // Contains all user-relevant settings for Wemos Lolin D32
	#elif (HAL == 4)
		#include "settings-lolin_d32_pro.h"                 // Contains all user-relevant settings for Wemos Lolin D32 pro
	#elif (HAL == 5)
		#include "settings-ttgo_t8.h"                       // Contains all user-relevant settings for Lilygo TTGO T8 1.7
	#elif (HAL == 6)
		#include "settings-complete.h"                      // Contains all user-relevant settings for ESPuino complete
	#elif (HAL == 7)
		#include "settings-lolin_d32_pro_sdmmc_pe.h"        // Pre-configured settings for ESPuino Lolin D32 pro with SDMMC + port-expander (https://forum.espuino.de/t/espuino-minid32pro-lolin-d32-pro-mit-sd-mmc-und-port-expander-smd/866)
	#elif (HAL == 8)
		#include "settings-azdelivery_sdmmc.h"              // Pre-configured settings for AZ Delivery ESP32 NodeMCU / Devkit C (https://forum.espuino.de/t/az-delivery-esp32-nodemcu-devkit-c-mit-sd-mmc-und-pn5180-als-rfid-leser/634)
	#elif (HAL == 9)
		#include "settings-lolin_d32_sdmmc_pe.h"            // Pre-configured settings for Lolin D32 (non-pro) with SDMMC + port-expander (https://forum.espuino.de/t/espuino-minid32-pro-lolin-d32-pro-mit-sd-mmc-und-port-expander-smd/866)
	#elif (HAL == 99)
		#include "settings-custom.h"                        // Contains all user-relevant settings custom-board
	#endif

	#endif //settings_override
#endif

settings-custom.h

// clang-format off

#ifndef __ESPUINO_SETTINGS_CUSTOM_H__
#define __ESPUINO_SETTINGS_CUSTOM_H__
    #include "Arduino.h"

    //######################### INFOS ####################################
    /* This is not a develboard-specific config-file. It's intended for your own use.
    It's been originally derived from lolin32, but just change it according your needs!
    */

    //################## GPIO-configuration ##############################
    // Please note: GPIOs 34, 35, 36, 39 are input-only and don't have pullup-resistors.
    // So if connecting a button to these, make sure to add a 10k-pullup-resistor for each button.
    // Further infos: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/
    #ifdef SD_MMC_1BIT_MODE
        // uSD-card-reader (via SD-MMC 1Bit)
        //
        // SD_MMC uses fixed pins
        //  (MOSI)    15  CMD
        //  (SCK)     14  SCK
        //  (MISO)     2  D0
    #else
        // uSD-card-reader (via SPI)
        #define SPISD_CS                    15          // GPIO for chip select (SD)
        #ifndef SINGLE_SPI_ENABLE
            #define SPISD_MOSI              13          // GPIO for master out slave in (SD) => not necessary for single-SPI
            #define SPISD_MISO              16          // GPIO for master in slave ou (SD) => not necessary for single-SPI
            #define SPISD_SCK               14          // GPIO for clock-signal (SD) => not necessary for single-SPI
        #endif
    #endif

    // RFID (via SPI)
    #define RST_PIN                         99          // Not necessary but has to be set anyway; so let's use a dummy-number
    #define RFID_CS                         5          // GPIO for chip select (RFID)
    #define RFID_MOSI                       23          // GPIO for master out slave in (RFID)
    #define RFID_MISO                       19          // GPIO for master in slave out (RFID)
    #define RFID_SCK                        18          // GPIO for clock-signal (RFID)

    #ifdef RFID_READER_TYPE_PN5180
        #define RFID_BUSY                   16          // PN5180 BUSY PIN
        #define RFID_RST                    22          // PN5180 RESET PIN
        #define RFID_IRQ                    39          // PN5180 IRQ PIN (only needed for low power card detection)
    #endif

    // I2S (DAC)
    #define I2S_DOUT                        22          // Digital out (I2S)
    #define I2S_BCLK                        26          // BCLK (I2S)
    #define I2S_LRC                         25          // LRC (I2S)

    // Rotary encoder
    #ifdef USEROTARY_ENABLE
        //#define REVERSE_ROTARY                        // To reverse encoder's direction; switching CLK / DT in hardware does the same
        #define ROTARYENCODER_CLK           34          // rotary encoder's CLK
        #define ROTARYENCODER_DT            35          // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
    #endif

    // Amp enable (optional)
    #define GPIO_PA_EN                      13          // To enable amp for loudspeaker (GPIO or port-channel)
    //#define GPIO_HP_EN                    113         // To enable amp for headphones (GPIO or port-channel)

    // Control-buttons (set to 99 to DISABLE; 0->39 for GPIO; 100->115 for port-expander)
    #define NEXT_BUTTON                    100          // Button 0: GPIO to detect next
    #define PREVIOUS_BUTTON                101          // Button 1: GPIO to detect previous (Important: as of 19.11.2020 changed from 33 to 2; make sure to change in SD-MMC-mode)
    #define PAUSEPLAY_BUTTON               102          // Button 2: GPIO to detect pause/play
    #define ROTARYENCODER_BUTTON           105          // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
    #define BUTTON_4                       103          // Button 4: unnamed optional button
    #define BUTTON_5                       104          // Button 5: unnamed optional button

    //#define BUTTONS_LED                   114         // Powers the LEDs of the buttons. Make sure the current consumed by the LEDs can be handled by the used GPIO

    // Channels of port-expander can be read cyclic or interrupt-driven. It's strongly recommended to use the interrupt-way!
    // Infos: https://forum.espuino.de/t/einsatz-des-port-expanders-pca9555/306
    #ifdef PORT_EXPANDER_ENABLE
        #define PE_INTERRUPT_PIN            32          // GPIO that is used to receive interrupts from port-expander
    #endif

    // I2C-configuration (necessary for RC522 [only via i2c - not spi!] or port-expander)
    #ifdef I2C_2_ENABLE
        #define ext_IIC_CLK                 4           // i2c-SCL (clock)
        #define ext_IIC_DATA                2           // i2c-SDA (data)
    #endif

    // Wake-up button => this also is the interrupt-pin if port-expander is enabled!
    // Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
    // Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
    #define WAKEUP_BUTTON                   ROTARYENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.

    // (optional) Power-control
    #define POWER                           17          // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep
    #ifdef POWER
        //#define INVERT_POWER                          // If enabled, use inverted logic for POWER circuit, that means peripherals are turned off by writing HIGH
    #endif

    // (optional) Neopixel
    #define LED_PIN                         33          // GPIO for Neopixel-signaling

    // (optinal) Headphone-detection
    #ifdef HEADPHONE_ADJUST_ENABLE
        //#define DETECT_HP_ON_HIGH                       // Per default headphones are supposed to be connected if HT_DETECT is LOW. DETECT_HP_ON_HIGH will change this behaviour to HIGH.
        #define HP_DETECT                   22          // GPIO that detects, if there's a plug in the headphone jack or not
    #endif

    // (optional) Monitoring of battery-voltage via ADC
    #ifdef MEASURE_BATTERY_VOLTAGE
        #define VOLTAGE_READ_PIN            33          // GPIO used to monitor battery-voltage. Change to 35 if you're using Lolin D32 or Lolin D32 pro as it's hard-wired there!
        constexpr float referenceVoltage = 3.35;                  // Voltage between 3.3V and GND-pin at the develboard in battery-mode (disconnect USB!)
        constexpr float offsetVoltage = 0.1;                      // If voltage measured by ESP isn't 100% accurate, you can add an correction-value here
    #endif

    // (optional) For measuring battery-voltage a voltage-divider is necessary. Their values need to be configured here.
    #ifdef MEASURE_BATTERY_VOLTAGE
        constexpr uint16_t rdiv1 = 129;                              // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
        constexpr uint16_t rdiv2 = 129;                              // Rdiv2 of voltage-divider (kOhms) (measure exact value with multimeter!) => used to measure voltage via ADC!
    #endif

    // (optional) hallsensor. Make sure the GPIO defined doesn't overlap with existing configuration. Please note: only user-support is provided for this feature.
    #ifdef HALLEFFECT_SENSOR_ENABLE
        #define HallEffectSensor_PIN        34  	// GPIO that is used for hallsensor (ADC); user-support: https://forum.espuino.de/t/magnetische-hockey-tags/1449/35
    #endif

    // (Optional) remote control via infrared
    #ifdef IR_CONTROL_ENABLE
        #define IRLED_PIN                   0               // GPIO where IR-receiver is connected (only tested with VS1838B)
        #define IR_DEBOUNCE                 200             // Interval in ms to wait at least for next signal (not used for actions volume up/down)

        // Actions available. Use your own remote control and have a look at the console for "Command=0x??". E.g. "Protocol=NEC Address=0x17F Command=0x68 Repeat gap=39750us"
        // Make sure to define a hex-code not more than once as this will lead to a compile-error
        // https://forum.espuino.de/t/neues-feature-fernsteuerung-per-infrarot-fernbedienung/265
        #define RC_PLAY                     0x68            // command for play
        #define RC_PAUSE                    0x67            // command for pause
        #define RC_NEXT                     0x6b            // command for next track of playlist
        #define RC_PREVIOUS                 0x6a            // command for previous track of playlist
        #define RC_FIRST                    0x6c            // command for first track of playlist
        #define RC_LAST                     0x6d            // command for last track of playlist
        #define RC_VOL_UP                   0x1a            // Command for volume up (one step)
        #define RC_VOL_DOWN                 0x1b            // Command for volume down (one step)
        #define RC_MUTE                     0x1c            // Command to mute ESPuino
        #define RC_SHUTDOWN                 0x2a            // Command for deepsleep
        #define RC_BLUETOOTH                0x72            // Command to enable/disable bluetooth
        #define RC_FTP                      0x65            // Command to enable FTP-server
    #endif
#endif

1 „Gefällt mir“

Your i2c-configuration (4 / 2) is entirely wrong.
Guess those reboot-problems are introduced because you configured GPIO 2 as SDA while it is in fact used for SDMMC.

Thanks for pointing this out. Updated to right pins, but no change. Bootloop with the same message. Changed the sdcard, just to be sure, but made no difference

    // I2C-configuration (necessary for RC522 [only via i2c - not spi!] or port-expander)
    #ifdef I2C_2_ENABLE
        #define ext_IIC_CLK                 27           // i2c-SCL (clock)
        #define ext_IIC_DATA                21           // i2c-SDA (data)
    #endif

Don’t know, maybe a timing problem. Try to integrate a/some delay(s) within setup().
Make sure all GPIOs are assigned according your schematics.

I managed to get rid of NVS error by increasing NVS partition size. Not sure why I’m having this issue. Disabled sdcard for now, although I have it tested in the simple sketch and it works well.

I’m running into another issue:

...
N [534] Init without SD card 
I (502) gpio: GPIO[15]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 

 _____   ____    ____            _
| ____| / ___|  |  _ \   _   _  (_)  _ __     ___
|  _|   \__  \  | |_) | | | | | | | | '_ \   / _ \
| |___   ___) | |  __/  | |_| | | | | | | | | (_) |
|_____| |____/  |_|      \__,_| |_| |_| |_|  \___/
         Rfid-controlled musicplayer


N [575] Software-revision: 20240923
N [575] Git-revision: 4474081-dirty
N [576] Arduino version: 2.0.17
N [586] ESP-IDF version: 4.4.7
N [586] Wakeup was not caused by deepsleep: 0
N [586] Mounting SD card in SPI-mode...
D [596] SD card type: UNKNOWN
N [597] SD card size / free space: 0 MB / 0 MB
I [597] Restored FTP-user from NVS: esp32
I [598] Restored FTP-password from NVS: esp32
I (566) gpio: GPIO[18]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (567) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (575) gpio: GPIO[23]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (584) gpio: GPIO[5]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (592) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
D [704] RC522 firmware version=0x92
D [755] RFID-tags can now be applied...
[   756][E][Preferences.cpp:498] getString(): nvs_get_str len fail: Hostname NOT_FOUND
I [766] Restored hostname from NVS: 
I (731) wifi:wifi driver task: 3ffd4874, prio:23, stack:3584, core=0
Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4008c580  PS      : 0x00060330  A0      : 0x80196345  A1      : 0x3ffd4720  
  #0  0x4008c580 in memcpy at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/memcpy.S:177

A2      : 0x00000000  A3      : 0x3ffd4ab8  A4      : 0x00000020  A5      : 0x00000000  
A6      : 0xffffffff  A7      : 0xffffffff  A8      : 0x00000000  A9      : 0x3ffd46d0  
A10     : 0x00001102  A11     : 0x00000041  A12     : 0x3f80bd14  A13     : 0x00000000  
A14     : 0x3ffd4730  A15     : 0x3ffcb6e8  SAR     : 0x00000008  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000000  LBEG    : 0x4008c57c  LEND    : 0x4008c598  LCOUNT  : 0x00000001  


Backtrace: 0x4008c57d:0x3ffd4720 0x40196342:0x3ffd4730 0x401964c3:0x3ffd4770 0x40194100:0x3ffd4790 0x401925a0:0x3ffd47b0 0x401d536d:0x3ffd47d0
  #0  0x4008c57d in memcpy at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/memcpy.S:175
  #1  0x40196342 in wifi_nvs_validate_sta_listen_interval at ??:?
  #2  0x401964c3 in wifi_nvs_init at ??:?
  #3  0x40194100 in wifi_init_process at ??:?
  #4  0x401925a0 in ieee80211_ioctl_process at ??:?
  #5  0x401d536d in ppTask at ??:?





ELF file SHA256: 7dd9432ea5b4a7a7

E (2038) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
Rebooting...

I would be happy to share a board with someone more experienced ni exchange of working config :slight_smile:

the hostname in the NVS ist empty → crash
Erase all and start from the beginnig may help (with the AP Mode)

I cleared the flash and hardcoded the hostname for now. New it seems to crach on malloc. At the beginning of the log it says that PSRAM is found

[   450][E][Preferences.cpp:406] getUInt(): nvs_get_u32 fail: playTimeTotal NOT_FOUND, returning default: 0
[   470][E][Preferences.cpp:354] getUChar(): nvs_get_u8 fail: PLSortMode NOT_FOUND, returning default: 3
I [480] Restored initial volume from NVS: 3
E [480] Wrote maximum volume for speaker to NVS.
N [480] Loudspeaker on
I (431) gpio: GPIO[13]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40093b44  PS      : 0x00060f33  A0      : 0x800946f2  A1      : 0x3ffb38b0  
  #0  0x40093b44 in block_size at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf_block_functions.h:74
      (inlined by) block_locate_free at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:441
      (inlined by) tlsf_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:850

A2      : 0x3f800014  A3      : 0xffffffff  A4      : 0xfffffffc  A5      : 0x00060023  
A6      : 0x00060020  A7      : 0x00000001  A8      : 0x00000010  A9      : 0x00000004  
A10     : 0xc05816f0  A11     : 0x00000434  A12     : 0x3f800038  A13     : 0x3f800078  
A14     : 0x00060f23  A15     : 0x00000000  SAR     : 0x0000001e  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000003  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  


Backtrace: 0x40093b41:0x3ffb38b0 0x400946ef:0x3ffb38d0 0x40094860:0x3ffb38f0 0x4008610c:0x3ffb3910 0x40086121:0x3ffb3940 0x4012f08d:0x3ffb3960 0x400d32ce:0x3ffb3980
  #0  0x40093b41 in block_locate_free at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:439
      (inlined by) tlsf_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_tlsf.c:850
  #1  0x400946ef in multi_heap_malloc_impl at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/multi_heap.c:187
  #2  0x40094860 in multi_heap_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/multi_heap_poisoning.c:234
      (inlined by) multi_heap_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/multi_heap_poisoning.c:223
  #3  0x4008610c in heap_caps_malloc_base at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_caps.c:175
      (inlined by) heap_caps_malloc_base at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_caps.c:120
  #4  0x40086121 in heap_caps_malloc at /home/andriy/.platformio/packages/framework-espidf@3.40407.240606/components/heap/heap_caps.c:195
  #5  0x4012f08d in ps_malloc at /home/andriy/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-psram.c:109
  #6  0x400d32ce in AudioCustom::operator new(unsigned int) at /home/andriy/prj/loud-esp-espuino/ESPuino/src/AudioPlayer.cpp:371
      (inlined by) AudioPlayer_Task at /home/andriy/prj/loud-esp-espuino/ESPuino/src/AudioPlayer.cpp:378

Hmm, give it a try with the dev-branch.