I've found the "SpiFlashChip g_rom_flashchip" structure in sdk/include/esp32/rom/spi_flash.h, so I've tried to access it.
It works, but funnily, it is stuffed with dummy values where the g_rom_flashchip.deviceId returns 1540ef (Windbond 2MB) when the esptool.py returns the following (GigaDevice 4MB) :
Code: Select all
So, this SpiFlashChip structure is completely useless until the SDK been fixed with REAL values...
This bring me also similar question : why system_get_chip_id() in ESP8266 doesn't exist anymore in in ESP32 ?
Those are quite basics ...