Skip to content

add documentation about boot messages and mode meaning #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions doc/boards.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,54 @@ ESPxx Hardware

### Improved Stability
![ESP improved stability](ESP_improved_stability.png)

### Boot Messages and Modes

The ESP module checks at every boot the Pins 0, 2 and 15.
based on them its boots in different modes:

| GPIO15 | GPIO0 | GPIO2 | Mode |
| ------ | ----- | ----- | -------------------------------- |
| 0V | 0V | 3.3V | Uart Bootloader |
| 0V | 3.3V | 3.3V | Boot sketch (SPI flash) |
| 3.3V | x | x | SDIO mode (not used for Arduino) |


at startup the ESP prints out the current boot mode example:
```
rst cause:2, boot mode:(3,6)
```

note:
- GPIO2 is used as TX output and the internal Pullup is enabled on boot.

#### rst cause

| Number | Description |
| ------ | ---------------------- |
| 0 | unknown |
| 1 | normal boot |
| 2 | reset pin |
| 3 | software reset |
| 4 | watchdog reset |


#### boot mode

the first value respects the pin setup of the Pins 0, 2 and 15.

| Number | GPIO15 | GPIO0 | GPIO2 | Mode |
| ------ | ------ | ----- | ----- | ---------- |
| 0 | 0V | 0V | 0V | Not valid |
| 1 | 0V | 0V | 3.3V | Uart |
| 2 | 0V | 3.3V | 0V | Not valid |
| 3 | 0V | 3.3V | 3.3V | Flash |
| 4 | 3.3V | 0V | 0V | SDIO |
| 5 | 3.3V | 0V | 3.3V | SDIO |
| 6 | 3.3V | 3.3V | 0V | SDIO |
| 7 | 3.3V | 3.3V | 3.3V | SDIO |

note:
- number = ((GPIO15 << 2) | (GPIO0 << 1) | GPIO2);