Need help with external SPI flash support - ESP32 WROOM 32D

ParadoMiD
Posts: 1
Joined: Sun Sep 19, 2021 1:42 pm

Need help with external SPI flash support - ESP32 WROOM 32D

Postby ParadoMiD » Sun Sep 19, 2021 2:47 pm

Hi,

Been using esp dev boards for a while and recently fancied trying my hand at making my own board.
I have designed a board that in all purposes is exactly like a Heltec Wifi v2 and Espressif devkitc v4 with a few alterations to suit the purposes I want.
I've also added a w25q128jvs winbond NOR flash as external flash to it, that I want to use as the default storage for bootloader, code, etc, rather than the 16Mb on the chip.

I do not know if i've used the wrong pins or what.
Link to my imgur with screenshot of EFuse summary, esp flashing and monitor, and pins used screenshotted from Kicad.

https://imgur.com/a/BlS76Xb

Used pins
GPIO9 SHD - /HOLD pin 7
GPIO10 SWP - /WP pin 3
GPIO11 CS0 - /CS pin 1
GPIO6 CLK - /CLK pin 6
GPIO7 D0 - D0 pin 2
GPIO8 D1 - D1 pin 5

Error I get from flashing
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, 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:0x3ff0030,len:4760
load:0x40078000,len:14268
ho 0 tail 12 room 4
load:0x40080400,len:3192
0x40080400: _init at ??:?

csum err:0x4a!=0x1b
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, 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:0x3ff0030,len:4760
load:0x40078000,len:14268
ho 0 tail 12 room 4
load:0x40080400,len:3192
0x40080400: _init at ??:?

entry 0x4008060c
Fatal exception (0): IllegalInstruction
epc1=0x400d5c0e, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
0x400d5c0e: print_cipher_type at c:\users\andre\documents\projects\esp-idf\examples\wifi\scan\build/../main/scan.c:80 (discriminator 13)
I read from https://www.esp32.com/viewtopic.php?f=1 ... 4&start=10 that I should use a different CS pin.
ESP_Angus wrote:
Thu Sep 07, 2017 5:47 am
A few other things to note:

Because of the way SPI buses work you can probably keep SPICLK, SPIQ, SPID, SPIHD, SPIWP on the same GPIOs are they are currently using. You only need need to find a new & unused pin for CS0. You will need to set efuses for all these pins anyhow (if one pin is remapped in efuse, then they all need to be remapped).

To set the SPI WP pin assignment, run "make menuconfig", go to "Serial flasher config" and enable QIO or QOUT mode. Then leave that submenu and go into "Bootloader Configuration". There will be a newly visible item "SPI Flash WP Pin when customising pin via efuse...". Set this to the WP pin GPIO number (10 if you are keeping the default pin layout).

If you don't keep SPICLK, SPIQ, SPID, SPIHD & SPIWP pins in the same location then it's likely that the WROVER PSRAM won't work, at least not without code modifications. ESP_Sprite can probably confirm.
Apologies for the possible ineptitude but I am somewhat new to this especially esp flashing, but if anyone can advise on if I have done something wrong with the pin assignment on the board, or that I have done something wrong with the pin assignment in efuse, or I am missing something all together.

Thanks and regards,
Andy

ESP_LJH
Posts: 384
Joined: Tue May 18, 2021 9:21 am

Re: Need help with external SPI flash support - ESP32 WROOM 32D

Postby ESP_LJH » Wed Sep 22, 2021 6:38 am

Why you want to replace the internal flash with your external flash? Since these pins you use are occupied by the internal flash, you should choose other 6 available pins to connect the external flash. But this flash could not share all same function with the internal flash. You could save your code in it.

Who is online

Users browsing this forum: No registered users and 69 guests