ESP8266 Will Not Boot - mhightower83/Arduino-ESP8266-misc GitHub Wiki
This appears to be a common problem when connecting ready-to-go SPI modules to the ESP8266. Many SPI modules, at least with the 3 out of the 4 MAX31855K peripheral boards I looked at, have a 10KΩ pull-up resistor on SPI Chip-Select. For most Arduino boards this may be fine; however, on the ESP8266 when using HSPI, pin GPIO15 is the Hardware SS (Subordinate Select). When Chip-Select from these peripheral boards is connected to GPIO15, the ESP8266, in most cases, will not boot. The GPIO15 pin serves a special purpose at boot time. To boot off the flash, GPIO15 must be held low or the device may start-up in an alternate boot mode. Most ESP8266 Development boards have a ~10K pull-down resistor on this pin. Combining the pull-down resistor with a pull-up resistor will results in an undefined logic level at boot time.
Some possible corrections:
- Select a different GPIO pin for SS and do a Soft Chip-Select
- Or remove the Chip-Select pull-up resistor from the peripheral board
- Or add an at boot isolation circuit to GPIO15. In Espressif's Hardware Design Guideline, Figure 1-10b. ESP8266EX UART SWAP they provide an example circuit to deal with a similar issue that can occur with MCUs connected to GPIO15. When reading the relevant first paragraph after Figure 1-10b, replace text MCU_RXD with SS. In addition to their text: GPIO5 or GPIO4 has to be used to control Q1 because at reset weak pull-ups are applied to most of the other GPIO pins. In the undriven state, Q1 is biased to be turned off. Weak pull-ups would interfere with this.
- Or lastly [Not recommended] decrease the pull-down resistor between GPIO15 and GND to 4.7KΩ. I think success with this option is dependent on the size of the pull-up resistor you are trying to counter, the amount of noise level on your board, and where the ESP8266 logic threshold is sitting.
With 3.3V divided by a 4.7KΩ resistor and a typical 10KΩ pull-up resistor on the SPI module you arrive at 1.06V, which is a little high for a logic 0, but not too far from 0.8V CMOS VIL. It may work some or most of the time; however, for proper noise handling, you want to be at a proper 0.4V CMOS VOL. I don't like this solution. It is not a robust solution; however, I mention it here because you may see it used elsewhere.
VIL is the maximum input voltage that is guaranteed to be recognized as a logic 0. VOL is the maximum driver output voltage for a logic 0, worst case for an output driver. The difference in CMOS VIL and VOL represents the amount of noise you can tolerate before your logic level enters the undefined region. Also interestingly if you use a 30KΩ pull-up against a 4.7KΩ pull-down you arrive at 0.45V. And 30KΩ just happens to be the minimum value you may see from the ESP8266's internal weak pull-up resistor. So if you have a pull-up of 30KΩ this solution could work; however, all the pull-ups I have seen in schematics have been 10 - 12KΩ at most.
The Adafruit HUZZAH ESP8266 module just happens to use this 4.7KΩ value for GPIO15 pull-down. I think their module may do better than other ESP8266 Modules using 10-12KΩ.