WinBond 16MB 133MHZ Flash not working

rsimpsonbusa
Posts: 124
Joined: Tue May 17, 2016 8:12 pm

WinBond 16MB 133MHZ Flash not working

Postby rsimpsonbusa » Tue May 26, 2020 3:36 pm

Hi everybody. Hope all well at home and family.

Does anybody know if a winbond W25Q16VSSIG (https://www.digikey.com/product-detail/ ... ND/1929225) works with the ESP32 as a replacement for the 4mb flash?

I did try it and it was able to flash it, at least no error was reported, including the verify hash. But when booting it goes into a reset with the message error code 13 and saying something about spi-flash.

The above chip is a 133mhz and esp32 only allows for 80mhz setup in menuconfig.

Tried seve3ral combinations of DIO-QIO/40-80MHZ Speed, Automatic detection/manual detection, flashing speed.

The console output is

Code: Select all

rst:0xc (SW_CPU_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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1260
load:0x40078000,len:13372
ho 0 tail 12 room 4
load:0x40080400,len:4240
entry 0x40080644
Which seems to say that there is no firmware.

Thanks for any help.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: WinBond 16MB 133MHZ Flash not working

Postby ESP_Angus » Wed May 27, 2020 1:52 am

Hi rsimpsonbusa,

As far as I know this flash chip model has not been tested with ESP32, so impossible to say for sure. All SPI NOR flash chips are similar but not identical, there is no universal standard for their behaviour. Using DIO or DOUT mode is the most likely to work on a new flash chip model.
rsimpsonbusa wrote:
Tue May 26, 2020 3:36 pm
The above chip is a 133mhz and esp32 only allows for 80mhz setup in menuconfig.
That's fine, the speed in this case is a maximum rating.

Note that routing a SPI bus to run at 80MHz (or even 40MHz or sometimes 20MHz) is not a 100% straightforward task for someone who hasn't done high speed digital PCB design before. It's easy to create a PCB layout that works at low speeds, or works most of the time, but occasionally triggers a bit error due to some signal integrity or noise issue. In the case of the ESP32's main flash chip, this will manifest as random crashes.
rsimpsonbusa wrote:
Tue May 26, 2020 3:36 pm
The console output is

Code: Select all

rst:0xc (SW_CPU_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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1260
load:0x40078000,len:13372
ho 0 tail 12 room 4
load:0x40080400,len:4240
entry 0x40080644
This boot log indicates that the ESP-IDF bootloader has been loaded from flash offset 0x1000 OK, with (seemingly) no errors. But the ESP-IDF bootloader isn't printing anything after this.

Are you actually using Arduino? If you are then I think the default IDF bootloader log level for Arduino is set very low, so it's possible you're not seeing some error messages that would otherwise be helpful. If you build a default ESP-IDF project then the default bootloader log level is higher, you may see something more informative logged.
rsimpsonbusa wrote:
Tue May 26, 2020 3:36 pm
when booting it goes into a reset with the message error code 13 and saying something about spi-flash.
Do you mean the output posted already, or are you seeing some other message?

If you mean "boot:0x13 (SPI_FAST_FLASH_BOOT)" then this indicates the boot mode set for the chip, specifically that it's going to try and boot from the SPI flash chip. It looks like it tries this, then something fails or times out and it software resets and tries again.

You can read more about how to decipher the boot log here:
https://github.com/espressif/esptool/wi ... de-message

rsimpsonbusa
Posts: 124
Joined: Tue May 17, 2016 8:12 pm

Re: WinBond 16MB 133MHZ Flash not working

Postby rsimpsonbusa » Wed May 27, 2020 2:35 am

Hi ESP_Angus

The esp32 wroom-32 flash chip was replaced by the winbond, so no new pcb or related pcb design errors/noise. The 8 pins where tested for continuity to the "external pins" (since the cap was removed). The environment is an app that is working with the default esp23 flash chip from XMC. I did try DIO-GIO and will try DOUT tomorrow. I work in espidf so I will make a hello world app and turn all debug/info levels possible from bootloader and log and will retry.

Also I did re-solder the XMC chip and it worked fine again.

I have added to another esp32 wroom-32 with a PSRAM chip and it works well (viewtopic.php?t=5450) and the idea was to replace the 4MB Flash with the 16MB and add the PSRAM(as the post did do actually replace the FALSH with a 16MB Flash). The app is getting rather big (wifi APSTA, https-client, webserver https(need 10 clients),sockets, html/css/ pages and a lot of other stuff) so I need more FLASH and RAM (heap actually).

I'll post the results of the Hello World app and hopefully you can guide me to some discovery. I appreciate u taking the time to answer and value your advice.

I could solder some lead to the MISO/MOSI/CS/CLK pins for my DSLogic analyzer but Ill leave that for last.

Regards.

rsimpsonbusa
Posts: 124
Joined: Tue May 17, 2016 8:12 pm

Re: WinBond 16MB 133MHZ Flash not working

Postby rsimpsonbusa » Wed May 27, 2020 4:52 am

Hi ESP_Angus

Well Im so embarrassed. I thought I bought a 16MByte chip (128Mb) but actually I got a 2MByte (16Mb) chip. :o

So All the problem is that it does not have the capacity, and it actually identifies the chip correctly as well as the capacity (2mega bytes 1<<0x15).

The log showed that and the cpu_start.c routine asserted the difference between the defined 16MB and the actual one 2MB.

Sorry for all the problem.
Attachments
Screen Shot 2020-05-26 at 10.35.20 PM.png
Screen Shot 2020-05-26 at 10.35.20 PM.png (45.78 KiB) Viewed 5584 times

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: WinBond 16MB 133MHZ Flash not working

Postby ESP_Angus » Wed May 27, 2020 6:31 am

Sneaky memory manufacturers and their insistence on "megabit"!

Glad you got to the bottom of it, hope you can find a bigger chip soon.

Who is online

Users browsing this forum: No registered users and 87 guests