Maybe the "panic" information is saying something? I don't know how to interpret this.
As you can see there is nothing specific after log output "spi_bus_initialize"
Here is how the code looks and this is what's in the trace with the highest level of VERBOSEty
#define ETHERNET_SPI_MOSI_GPIO 35 // Example GPIO for MOSI
#define ETHERNET_SPI_MISO_GPIO 37 // Example GPIO for MISO
#define ETHERNET_SPI_CLK_GPIO 36 // Example GPIO for SCK
#define ETHERNET_SPI_CS_GPIO 38 // Example GPIO for CS
void ethernet_init() {
ESP_LOGI(TAG, "ethernet_init");
esp_err_t ret;
// Initialize the SPI bus for SPI3
spi_bus_config_t buscfg = {
.mosi_io_num = ETHERNET_SPI_MOSI_GPIO,
.miso_io_num = ETHERNET_SPI_MISO_GPIO,
.sclk_io_num = ETHERNET_SPI_CLK_GPIO,
.quadwp_io_num = -1, // Not used
.quadhd_io_num = -1, // Not used
.max_transfer_sz = 4096,
};
ESP_LOGI(TAG, "spi_bus_initialize");
// ESP_ERROR_CHECK(spi_bus_initialize(SPI3_HOST, &buscfg, SPI_DMA_CH_AUTO));
esp_err_t err = spi_bus_initialize(SPI3_HOST, &buscfg, SPI_DMA_CH_AUTO);
if (err != ESP_OK) {
ESP_LOGE("SPI", "Failed to initialize bus: %s", esp_err_to_name(err));
return;
}
ESP_LOGI(TAG, "spi_bus_initialize complete");
...
}
Code: Select all
I (1929) main: IDF version: v5.1.5-dirty
I (1934) main: ESP-IDF Version: 5.1.5
I (1938) Ethernet: ethernet_init
I (1942) Ethernet: spi_bus_initialize
D (1947) gdma: new group (0) at 0x3c070b80
D (1951) gdma: new pair (0,0) at 0x3c070bc4
D (1955) gdma: new tx channel (0,0) at 0x3c070b4c
D (1960) gdma: new rx channel (0,0) at 0x3c070be4
D (1965) spi: SPI3 use gpio matrix.
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x40375b61
--- 0x40375b61: panicHandler at /Users/igor/esp/v5.1.5/esp-idf/components/esp_system/port/panic_handler.c:217
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fce3810,len:0x1a2c
load:0x403c9700,len:0x4
load:0x403c9704,len:0x1088
load:0x403cc700,len:0x2fc8
SHA-256 comparison failed:
Calculated: 199fc0fcb8b95d8ca3a70b2bf648cf011b7b8936d0c7f11a9f79f9553fa7fe37
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c9994