From 42399d446a086d87a698a515c5579bc1d9e54229 Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Sun, 21 Aug 2022 11:15:47 +0200 Subject: [PATCH] Fix wrong flash_chip_id on ESP32, when DOUT is not used This also fixes the wrong reported flash size for flash modes: DIO, QUOUT and QIO. Now a global struct is used, which gets populated by the boot loader. --- tasmota/tasmota_support/support_esp.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/tasmota_support/support_esp.ino b/tasmota/tasmota_support/support_esp.ino index b0fa13396..780f35bcb 100644 --- a/tasmota/tasmota_support/support_esp.ino +++ b/tasmota/tasmota_support/support_esp.ino @@ -558,7 +558,7 @@ int32_t ESP_getHeapFragmentation(void) { uint32_t ESP_getFlashChipId(void) { - uint32_t id = bootloader_read_flash_id(); + uint32_t id = g_rom_flashchip.device_id; id = ((id & 0xff) << 16) | ((id >> 16) & 0xff) | (id & 0xff00); return id; }