Pins swapped on flash? Incorrect flash chip?

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Pins swapped on flash? Incorrect flash chip?

Postby cnlohr » Sat Dec 03, 2016 5:49 am

I've finally gotten around to trying to work on my ESP32+Ethernet board and tried programming it to no avail.

Code: Select all

Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
And it gets stuck on Configuring flash size...

I assumed it has to do with my pin-mapping to the flash. I use a W25Q chip, i.e. W25Q128. I mapped my pins to that package and these don't seem to match up to the ones on some of the data sheets floating around. IO0/1 and IO2/3 are swapped.

I tried swapping them on my board to no avail. Can you confirm that the W25Q series is compatible and that this is correct?

Image

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Pins swapped on flash? Incorrect flash chip?

Postby WiFive » Sat Dec 03, 2016 8:48 am

Yes, check hardware design guidelines
http://espressif.com/en/support/download/overview

You should be matching spi pins not SD or hs1 pins even though it is dual/quad spi. Confusing and not well documented until now.

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Re: Pins swapped on flash? Incorrect flash chip?

Postby cnlohr » Sat Dec 10, 2016 3:11 pm

Hmm? My complaint is that the official schematic does not match the pinout of the W25Q... I am not sure if this is because I have the wrong flash chip?

Image
Image

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Pins swapped on flash? Incorrect flash chip?

Postby ESP_Sprite » Sun Dec 11, 2016 7:39 am

Huh? In what sense does it not match? Because at least the pin numbers and flash signals seem to line up perfectly, unless I'm overlooking something.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Pins swapped on flash? Incorrect flash chip?

Postby WiFive » Sun Dec 11, 2016 8:13 am

ESP_Sprite wrote:Huh? In what sense does it not match? Because at least the pin numbers and flash signals seem to line up perfectly, unless I'm overlooking something.
The confusion is that one is focused on "I'm going to use quad i/o mode" and if you look at flash io0-io3 they do not connect to SD_data0-SD_data3. So it's just a potential whoops if you are not paying attention. Mostly this is due to a lack of detail in documentation of sdio and spi, what they do, how they are related (not). And the labels on the schematic.

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Re: Pins swapped on flash? Incorrect flash chip?

Postby cnlohr » Wed Dec 14, 2016 2:12 am

There is contradictory labeling on the W25Q... I'm just not sure what way it's "supposed" to be. Are the pins labeled incorrectly but wired right in the official schematic?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Pins swapped on flash? Incorrect flash chip?

Postby WiFive » Wed Dec 14, 2016 4:42 am

cnlohr wrote:There is contradictory labeling on the W25Q... I'm just not sure what way it's "supposed" to be. Are the pins labeled incorrectly but wired right in the official schematic?
Not seeing it. Are you talking about the fact that they are drawn out of order but still numbered correctly, or can you be more specific?

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

Re: Pins swapped on flash? Incorrect flash chip?

Postby ESP_Angus » Wed Dec 14, 2016 6:11 am

I think what cnlohr means is that on the flash datasheet, DO is marked "IO1" whereas on the ESP32 pinout, DO is known as "SD_DATA_0"/"SD0". Similarly, on the flash chip DI is marked "IO0" whereas on the ESP32 pinout DI is known as "SD_DATA_1"/"SD1". cnlohr has matched the numbers on the flash datasheet to the numbers used on the ESP32 pin names, meaning DI and DO are swapped.

I don't know how much of the IO numbering here is a convention that may vary between different chip vendors.

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: Pins swapped on flash? Incorrect flash chip?

Postby rudi ;-) » Mon Feb 27, 2017 3:49 pm

cnlohr wrote:I've finally gotten around to trying to work on my ESP32+Ethernet board and tried programming it to no avail.
hi charles
which eth phy chip you use?
have you try to generate the clk over gpio16?
any success?

best wishes
rudi ;-)

edit:
ah, think found it
cnlohr_eth_board_40x.jpg
cnlohr_eth_board_40x.jpg (77.85 KiB) Viewed 15193 times
datasheet
KSZ8081RNAZA

have you tested it ? - , RMII work's
btw:
from where you take the src 50MHz clk?
extra Osz or GPIO16 or other?

thanks!

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: No registered users and 65 guests