How many times can you flash?

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

Re: How many times can you flash?

Postby ESP_Angus » Tue Sep 18, 2018 12:17 am

Is it possible something might have been shorting one of the SPI pins on the ESP32 at the time it was not responding to commands (ie flash model 0xffff, etc)? This is the most common cause of this problem that I see (the chip appears to disappear entirely if it isn't getting a complete set of SPI signals).

The SPI signals are quite high speed, so if it's a dev board that exposes the SPI pins even having them touch something slightly conductive (or capacitive) can be enough to spoil communications.

The other possible cause is the MTDI pin (GPIO12) being pulled high on reset which puts the flash chip into 1.8V mode, if that particular flash chip doesn't support 1.8V operation then it browns out and will appear to do nothing.

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: How many times can you flash?

Postby chromebin » Tue Sep 18, 2018 4:46 pm

ESP_Angus wrote:Is it possible something might have been shorting one of the SPI pins on the ESP32 at the time it was not responding to commands (ie flash model 0xffff, etc)? This is the most common cause of this problem that I see (the chip appears to disappear entirely if it isn't getting a complete set of SPI signals).
I tried to verify this after searching the net. Also tried to press the module to see if that impacted things. So I discarded this, but it's always a possibility.
The SPI signals are quite high speed, so if it's a dev board that exposes the SPI pins even having them touch something slightly conductive (or capacitive) can be enough to spoil communications.
We did plan an external flash, until discovering that it would not be memory mapped. So we have almost the shortest possible tracks to the pads, nothing soldered.
The other possible cause is the MTDI pin (GPIO12) being pulled high on reset which puts the flash chip into 1.8V mode, if that particular flash chip doesn't support 1.8V operation then it browns out and will appear to do nothing.
That's interesting, as I started using that pin for bit-banging a HT1381 RTC. As it's the data line, that involves switching from an output to an input and back. But before that it already was in use for SPI. The difference is the RTC chip, which wasn't present before.

Also, I remember having to do a:

// by default consumed by JTAG, so restore
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[15], PIN_FUNC_GPIO);
Before I could use the pin 15, but that is pin MTDO, not MTDI.

Who is online

Users browsing this forum: adadaadadade, Bing [Bot] and 87 guests