We can add an external 1.8v flash, external 1.8v regulator (as VDD_SDIO is not exposed), but the issue is the CS line for external flash.
Given that GPIO16 and GPIO17 (the last two remaining GPIOs in VDD_SDIO domain) are used for PSRAM inside the module, we have to use a 3.3v domain CS line. So, we use GPIO22 (as with our previous work on WROOM-32) but need to level shift down to 1.8v (as flash chip is not 3.3v tolerant). We chose a SN74LV1T34 level converter for that CS line (3.3v->1.8v).
Here are the eFuse settings we use:
Code: Select all
XPD_SDIO_FORCE Ignore MTDI pin (GPIO12) for VDD_SDIO on reset = 1 R/W (0x1)
XPD_SDIO_REG If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset = 1 R/W (0x1)
XPD_SDIO_TIEH If XPD_SDIO_FORCE & XPD_SDIO_REG, 1=3.3V 0=1.8V = 0 R/W (0x0)
SPI_PAD_CONFIG_CLK Override SD_CLK pad (GPIO6/SPICLK) = 6 R/W (0x6)
SPI_PAD_CONFIG_Q Override SD_DATA_0 pad (GPIO7/SPIQ) = 7 R/W (0x7)
SPI_PAD_CONFIG_D Override SD_DATA_1 pad (GPIO8/SPID) = 8 R/W (0x8)
SPI_PAD_CONFIG_HD Override SD_DATA_2 pad (GPIO9/SPIHD) = 9 R/W (0x9)
SPI_PAD_CONFIG_CS0 Override SD_CMD pad (GPIO11/SPICS0) = 22 R/W (0x16)
DISABLE_SDIO_HOST Disable SDIO host = 0 R/W (0x0)
Booting with PSRAM disabled works just fine. But, as we suspected, with PSRAM enabled we get a crash accessing the PSRAM:
Code: Select all
rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 156795334, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4468
load:0x40078000,len:0
load:0x40078000,len:12988
entry 0x40078d14
Guru Meditation Error: Core 0 panic'ed (LoadProhibited)
. Exception was unhandled.
Register dump:
PC : 0x401370c8 PS : 0x00060530 A0 : 0x400da3ac A1 : 0x3ffe3b90
0x401370c8: mg_if_recv_tcp_cb at .../components/mongoose/src/mongoose.c:11367
0x400da3ac: psram_read_id at ../esp-idf/components/esp32/./spiram_psram.c:331
A2 : 0x3ffe3bd0 A3 : 0x000000e1 A4 : 0x0ffd114c A5 : 0x00000000
A6 : 0x000008ff A7 : 0x00000001 A8 : 0x00001b00 A9 : 0x00001000
A10 : 0x00000b00 A11 : 0x0ffd104f A12 : 0x00000034 A13 : 0x00000000
A14 : 0x000008ff A15 : 0x00000004 SAR : 0x00000017 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00001024 LBEG : 0x4009b028 LEND : 0x4009b033 LCOUNT : 0x00000000
0x4009b028: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:142
0x4009b033: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:152
Backtrace: 0x401370c8:0x3ffe3b90 0x400da3a9:0x3ffe3bd0 0x400d7d39:0x3ffe3c00 0x4008156a:0x3ffe3c20 0x40078aa6:0x3ffe3c40 0x40078b59:0x3ffe3c70 0x40078ced:0x3ffe3cb0 0x40078e36:0x3ffe3e70 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20
0x401370c8: mg_if_recv_tcp_cb at ../components/mongoose/src/mongoose.c:11367
0x400da3a9: psram_read_id at ../esp-idf/components/esp32/./spiram_psram.c:330
0x400d7d39: esp_spiram_init at ../components/esp32/./spiram.c:109
0x4008156a: call_start_cpu0 at ../components/esp32/./cpu_start.c:149
Any ideas? Fastest level converter I can find is still around 1.x ns.