-1

I’m facing a persistent reboot issue on one of my ESP32-S3 boards after flashing a larger firmware binary. Here’s a breakdown of the problem:

🔧 What’s Happening

After flashing my project (which worked earlier), the board continuously reboots with:

Guru Meditation Error: Core 1 panic'ed (LoadProhibited)

Backtrace points to invalid memory access—likely due to bad pointer or heap exhaustion.

✅ What I’ve Tried

Flashed Blink Sketch: Works perfectly—board hardware appears okay for small binaries.

Same Firmware on Another Board: No issues. Confirms code is not at fault.

Erased Flash via esptool.py:

esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash

Manually Reset NVS Using Code:

#include <nvs_flash.h>
void setup() {
    nvs_flash_erase();
    nvs_flash_init();
}

Used Espressif’s Flash Download Tool: Flashed bootloader.bin (0x0000), partitions.bin (0x8000), and firmware.bin (0x10000)

No luck—the board still reboots. Tested Multiple USB Cables and Ports: Stable power supply confirmed.

❗ The Catch

Once I flash the buggy firmware, even reverting to previous working builds won’t fix the reboot—unless it’s a trivial sketch like Blink. It's like something persists and interferes with booting.

🔍 What I Suspect
  • Flash memory corruption or unreadable NVS
  • Damaged or write-protected flash sector
  • Misaligned partition table after bad flash
  • Board-specific hardware failure (but no visible damage)

Any advice on:

  1. Checking flash chip health or ID
  2. Forcing a full flash overwrite (including factory partition?)
  3. Recovering from possible bootloader or NVS corruption
  4. Verifying NVS and partition health via command-line tools or logs

I’m happy to share boot logs, backtrace, or decoded .elf addresses if it helps debug this further.

2
  • Maybe look at the Tools > Partition Scheme menu which controls the allocation of the flash memory. You may not be allocating enough to the application and could possibly drop say allocation to a file system or to OTA (over the air uploads). How much flash memory has your ESP32 board ? Commented Jun 16 at 21:12
  • Didn't pressing the RST button help? Is there anything else connected to your ESP32? Commented Nov 14 at 13:39

1 Answer 1

-1

This worked for me. I replaced the code of the lcd test example of waveshare wiki ESP32-S3-LCD-1.28-Test.ino. After hours of trying, I was able to write the screen with no rebooting. But in Arduino, hope I gives you a hint.

Now I am trying to solve reboot issues while combining this code with wifi functionality. Standard wifi codes alone works perfect but combined with screen reboots.

 //code for replace as it needs the includes files
#include <Arduino.h>
#include "LCD_Test.h"

// --- Variables ---
UWORD Imagesize = LCD_1IN28_HEIGHT * LCD_1IN28_WIDTH * 2;
UWORD *BlackImage = NULL;

void setup() {
  Serial.begin(115200);
  Serial.println("\n=== PRUEBA SIMPLE LCD 1.28 ===");

  // --- Inicializar módulo ---
  if (DEV_Module_Init() != 0) {
    Serial.println("❌ Error al inicializar GPIOs");
    while (1);
  } else {
    Serial.println("GPIO Init OK");
  }

  // --- Desactivar PSRAM (si está activa en menú) ---
  // No usamos ps_malloc aquí
  BlackImage = (UWORD *)malloc(Imagesize);
  if (BlackImage == NULL) {
    Serial.println("❌ Error: sin memoria para imagen");
    while (1);
  }

  // --- Inicializar pantalla ---
  LCD_1IN28_Init(HORIZONTAL);
  LCD_1IN28_Clear(WHITE);

  // --- Crear buffer de dibujo ---
  Paint_NewImage((UBYTE *)BlackImage, LCD_1IN28.WIDTH, LCD_1IN28.HEIGHT, 0, WHITE);
  Paint_SetScale(65);
  Paint_SetRotate(ROTATE_0);
  Paint_Clear(WHITE);

  // --- Dibujar mensaje de prueba ---
  Paint_DrawString_EN(40, 80, "Pantalla OK", &Font20, BLUE, WHITE);
  Paint_DrawString_EN(60, 120, "Test basico", &Font16, BLACK, WHITE);
  LCD_1IN28_Display(BlackImage);

  Serial.println(" Test mostrado en pantalla.");
}

void loop() {
  // Alterna color de fondo cada 2 segundos
  static bool invert = false;
  invert = !invert;
  if (invert)
    Paint_Clear(0xFFFF); // Blanco
  else
    Paint_Clear(0x0000); // Negro

  Paint_DrawString_EN(60, 110, "Pantalla viva", &Font20, RED, invert ? WHITE : BLACK);
  LCD_1IN28_Display(BlackImage);
  delay(2000);
}

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. Commented Nov 11 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.