External Flash dosen't answer - get flash id error

mseerig
Posts: 8
Joined: Tue Feb 21, 2017 2:10 pm

External Flash dosen't answer - get flash id error

Postby mseerig » Thu Feb 23, 2017 11:25 am

Since a few days, I have a problem with the external SPI Flash. I tried to design a esp32 based board for my solutions and added the W25Q32JV SPI Flash tool the circuit (link below).
Now there comes a "get flash id error" while downloading the firmeare although the SPI signals looks pretty clean and correct. The ESP32 is sending 05h on SD0 (on the esp) to read the Status Register of the flash chip but there are now answer on any data lines.
Note: There are also clock signals (8bit) after the 05h value on SD0
https://www.winbond.com/resource-files/ ... 302016.pdf

SCK line:
I measured everytime a 10MHz clock. It does't matter what I selected in the flash tool. The whole settings form the flash tool seems to have no influence on the SPI protocol (while get flash id)
Also a serial resistor (as described in the design guidelines) have also not a real influence on my data lines.

Pin mapping:
It seems that my chip has a different pin out as the chip form the documentation files. SD0 and SD1 and also SD2 and SD3 have the opposite pin numbers on the chip. May be, is is a failture in the documentation, or the pins are actually switched over on my chip. For me, it's a little bitte confusing, because all SPI flash chips are usealy pin compatible.

My questions:
- What is the difference between SPIdownload and HSPIdownload in the ESP32 Flash tool?
- Are there maybe any configurations which I fogott to enter the correct download mode?
- Why have the settings in the download tool no influence on the SPI protocol?
- Is the described failure caused by the ESP, or by the flash?

Thank you, for your help!

Marcel

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

Re: External Flash dosen't answer - get flash id error

Postby ESP_Angus » Thu Feb 23, 2017 11:33 pm

Hi Marcel,
mseerig wrote: SCK line:
I measured everytime a 10MHz clock. It does't matter what I selected in the flash tool. The whole settings form the flash tool seems to have no influence on the SPI protocol (while get flash id)
These settings are for configuring the bootloader (a small header is edited when the bootloader is flashed to the chip) to give the boot parameters for the system. They don't alter the settings the flashing process uses (it always uses basic SPI at 10MHz.)
mseerig wrote: Pin mapping:
It seems that my chip has a different pin out as the chip form the documentation files. SD0 and SD1 and also SD2 and SD3 have the opposite pin numbers on the chip. May be, is is a failture in the documentation, or the pins are actually switched over on my chip. For me, it's a little bitte confusing, because all SPI flash chips are usealy pin compatible.
I'm sorry, I think you're the second person who has come across this. The SD0,1,2,3 numbers in the ESP32 do not match the IOx numbers used on the SPI flash data sheet.

Some previous discussion is here:
https://esp32.com/viewtopic.php?t=634

Following the pin numbers (rather than pin labels) on the reference design will give you the correct pin mappings.

I'm not sure why the hardware team chose the numbering they did. I'll bring this up internally, although we probably can't change it for the ESP32 at this point we may be able to add some warnings to the documentation.
mseerig wrote: What is the difference between SPIdownload and HSPIdownload in the ESP32 Flash tool?
HSPI is a second SPI host peripheral, rather than the default peripheral normally used for SPI flash. HSPI is usually used for external SPI devices, but it's possible to use it as the primary SPI flash source by setting efuses and enabling this option. You should use SPIdownload for now.

Angus

Who is online

Users browsing this forum: No registered users and 188 guests