Page 1 of 2

ESP-WROOM-32 and extending the flash

Posted: Sun Jun 17, 2018 7:23 am
by sorenhl
Hi,

I a am quite new to this, so I apologize if my question seems to be common knowledge.

I am currently in the making of a project, but I discovered that I had too little storage available for the application thus I want to run the program from an external flash and burn the efuses.

As I still want to use JTAG, I am planning to boot from VSPI, are there any downsides when doing this?

I have found the 16MB flash chip named W25Q128FV, can anybody confirm that this is suitable? And I read there are different flash modes, does this support qio?

If you recommend any other type of chip please let me know as I am really inexperienced in this area :)

/Søren

Re: ESP-WROOM-32 and extending the flash

Posted: Wed Jun 20, 2018 7:59 pm
by sorenhl
Still waiting for the flash chips to arrive, but reading their documentation they seem to be doing quo just fine.

Now if anybody have any experience with this flash, especially regarding stability, downsides, etc., I would really love to hear it.

Otherwise I will ofcourse be updating this thread with my findings when I get to play with it.

Re: ESP-WROOM-32 and extending the flash

Posted: Thu Jun 21, 2018 8:07 am
by loboris
I have replaced the original Flash chip with W25Q128FV on several ESP-WROM-32 modules and it works without any issue (QIO mode/80 MHz).
I don't see any reason why it shouldn't work as external Flash also.

By the way, it is easy to add the SPI-RAM to.
Image

ESP-WROOM-32 modules with 8 MB and 16 MB Flash are now available (as well as ESP32-Wrover modules), so there is not much need for adding the external flash chip.

Re: ESP-WROOM-32 and extending the flash

Posted: Thu Jun 21, 2018 7:02 pm
by dmaxben
loboris wrote: ESP-WROOM-32 modules with 8 MB and 16 MB Flash are now available (as well as ESP32-Wrover modules), so there is not much need for adding the external flash chip.
Very cool! Ive been waiting for someone to make custom WROOM32 with 16MB of flash, that is also FCC certified with the metal RF shield.

AnalogLamb has had the 16MB WROOM32 modules for a little while, but they did not have the metal RF shield or the FCC compliance marking.

Any tips on re-configuring the Arduino IDE to recognize/utilize the larger 16MB flash? Once you have made the changes in the appropriate files, can you still flash right from the Arduino IDE? Or do you have to flash from the ESP python script due to the extra flash memory?

Re: ESP-WROOM-32 and extending the flash

Posted: Sun Jun 24, 2018 11:32 am
by Deouss
loboris wrote:
ESP-WROOM-32 modules with 8 MB and 16 MB Flash are now available (as well as ESP32-Wrover modules), so there is not much need for adding the external flash chip.
How about WROVER pcbs to mount the modules?
Best would be with uart bridge.
Where can I get them cheap?

Re: ESP-WROOM-32 and extending the flash

Posted: Sun Jun 24, 2018 3:25 pm
by loboris
AnalogLamb has ESP32-WROVER Breakout Board for 1.99 US$, but without USB2UART chip, and ESP32 Fixer Board for ESP32-WROVER, but it is not cheap (18.88 US$).

Re: ESP-WROOM-32 and extending the flash

Posted: Tue Jun 26, 2018 8:52 pm
by sorenhl
Thank you all for the great responses, both regarding the confirmation of W25Q128FV and the tip about purchasing with custom flash size.

Decision:
I have decided upon configuring the flash externally as intended initially, simply because I need to be sure that I can obtain the ESP-WROOM-32 and the flash for the factory and I do not have a large enough production to order 5000+ pcs directly from espressif, so I do not want to rely my whole production line on custom built modules (even through it is proberly quite safe). I am not creating that small of a product either, so adding the flash to the PCB was not an issue.

Testing:
I have now received my flash and it simply just works :)

I first tried to flash it using the argument "--spi-connection 18,19,23,4,5" for VSPI which detects the 16MB and flashes the chip but it did not boot on it. I used this to confirm my pins and flash worked as intended.

I then burned the efuses which did so it now boots perfectly with the 16MB:

Code: Select all

./espefuse.py --port /dev/ttyS2 burn_efuse SPI_PAD_CONFIG_CLK 18
./espefuse.py --port /dev/ttyS2 burn_efuse SPI_PAD_CONFIG_Q 19
./espefuse.py --port /dev/ttyS2 burn_efuse SPI_PAD_CONFIG_D 23
./espefuse.py --port /dev/ttyS2 burn_efuse SPI_PAD_CONFIG_HD 4
./espefuse.py --port /dev/ttyS2 burn_efuse SPI_PAD_CONFIG_CS0 5
Finally i increased the sizes of my partitions and everything is running smoothly :)

/Søren

Re: ESP-WROOM-32 and extending the flash

Posted: Thu Aug 30, 2018 10:56 am
by japsvilla
Hi sorenhl, sorry for asking but I have some problems to implement your solution,
I burned the efuses to 18,19,23,21,5 for VSPI (4 for SPIHD is not for HSPI?) and now I can flash in DIO mode
(I flashed the hello world example), but in QIO I get an error message after flashing:

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 353727698, 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:6368
ho 0 tail 12 room 4
load:0x40078000,len:10116
load:0x40080400,len:6840
entry 0x40080768

I (31) boot: ESP-IDF v3.2-dev-518-g020ade65 2nd stage bootloader
I (31) boot: compile time 11:25:36
I (31) boot: Enabling RNG early entropy source...
I (37) qio_mode: Enabling QIO for flash chip ISSI
I (43) boot: SPI Speed : 40MHz
I (47) boot: SPI Mode : QOUT
I (51) boot: SPI Flash Size : 16MB
E (55) flash_parts: partition 0 invalid magic number 0x10ee
E (61) boot: Failed to verify partition table
E (66) boot: load partition table error!

And then reboots again and again

How did you flashed it? I changed the WP pin option in make menuconfig menu to "22"
but I dont know if i'm doing it wrong or something.

Thank you all.

PD: My flash is an IS25WP128F

Re: ESP-WROOM-32 and extending the flash

Posted: Fri Aug 31, 2018 12:19 am
by markwj
We wasted about a year with external flash. It works ok on WROOM32 (in DIO mode), but just too much trouble on WROVER32 (due to no spare 1.8v GPIO for CS, 1.8v not exposed externally, level shifting, hard-coded firmware not supporting it, etc).

My recommendation is to use modules with 16MB flash already onboard. They are generally available from several sources now. We've had zero problems with this since we moved to 16MB onboard WROVER32 modules.

Re: ESP-WROOM-32 and extending the flash

Posted: Tue Jul 16, 2019 1:15 pm
by ROSE MARIYA
Hi,
I am SPIFFS library to store the data received from bluetooth into flash.At the same time two timer interrupts are working.
But I am facing an issue , both timer interrupts and SPIFFS crash the ESP32 and
shows an error 'Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed)' . If I comment out the
TimerEnable, the code will run.
I need to store my bluetooth data in flash.Because I need to use that data even after a power loss.How can I run SPIFFs and Timer interrupt in the same code.
Thank you all in advance