diff --git a/tasmota/tasmota_support/support_esp.ino b/tasmota/tasmota_support/support_esp.ino index 92346ab32..6fa3a1d31 100644 --- a/tasmota/tasmota_support/support_esp.ino +++ b/tasmota/tasmota_support/support_esp.ino @@ -659,8 +659,7 @@ uint32_t ESP_getFlashChipMagicSize(void) { return ESP_magicFlashChipSize(fhdr.spi_size); } -uint32_t ESP_magicFlashChipSize(uint8_t byte) -{ +uint32_t ESP_magicFlashChipSize(uint8_t byte) { switch(byte & 0x0F) { case 0x0: // 8 MBit (1MB) return 1048576; @@ -672,8 +671,10 @@ uint32_t ESP_magicFlashChipSize(uint8_t byte) return 8388608; case 0x4: // 128 MBit (16MB) return 16777216; - default: // fail? - return 0; + case 0x5: // 256 MBit (32MB) + return 33554432; + default: // fail so return (1KB) + return 1024; } }