esp-wroom-02がエラーコードをシリアル
モニタにはき出したものを見るとたとえば
rst case:2 boot mode:(1,6)
みたいなのが書いてある。
今回はそのboot modeについて
端的に言うとboot mode:(x,y)は
esp-wroom-02の状態を表している。
シリアルモニタの通信速度を74880bps
に設定するとboot modeを知ることが
出来る。
まずはboot modeのxについて
GPIO15,GPIO0,GPIO2のピンの状態を
2進数で表すと以下の表のようになる
| 2進数 | GPIO15 | GPIO0 | GPIO2 |
|---|---|---|---|
| 000 | Low | Low | Low |
| 001 | Low | Low | High |
| 010 | Low | High | Low |
| 011 | Low | High | High |
| 100 | High | Low | Low |
| 101 | High | Low | High |
| 110 | High | High | Low |
| 111 | High | High | High |
それぞれのピンの状態によって
ESP8266の動作が変わる
シリアルモニタで表示されるboot mode(x,y)
のxは以下の表の10進数部分と対応する
例えば
esp8266にプログラムを書き込むときは
x=1に設定する
またプログラムを実行するときは
x=3に設定する
| code(2進数) | code(10進数) | 意味 |
|---|---|---|
| 000 | 0 | Remapping |
| 001 | 1 | Boot from the UART0. Also includes flashing the flash memory for subsequent normal start |
| 010 | 2 | Jump start |
| 011 | 3 | Boot from flash memory |
| 100 | 4 | SDIO low speed V2 |
| 101 | 5 | SDIO high speed V1 |
| 110 | 6 | SDIO low speed V1 |
| 111 | 7 | SDIO high speed V2 |
次はboot mode(x,y)のyの部分について
以下の表に示した
yの値はcodeの値と対応する
| code | 意味 |
|---|---|
| 0 | Remapping |
| 1 | UART Boot |
| 2 | Jump Boot |
| 3 | FLASH Boot |
| 4 | SDIO LowSpeed V2 IO Uart1 Booting |
| 5 | SDIO HighSpeed V1 IO Uart1 Booting |
| 6 | SDIO LowSpeed V1 IO Uart1 Booting |
| 7 | SDIO HighSpeed V2 IO Uart1 Booting |
<参考文献>