#author("2023-04-19T10:39:05+08:00","default:Admin","Admin")
#author("2023-04-19T10:39:14+08:00","default:Admin","Admin")
[[ESP8266]]

&color(red){※This article is based on ESP8266_RTOS_SDK 3.0};

* 波特率 [#j8d22433]

ESP8266 的程序运行输出日志默认使用的串口波特率为 74480 bps,使用的是 SPI Speed 的 40MHz 的晶振,与 CPU 主频有关。可在 menuconfig 中进行修改,如下:
menuconfig —> Component config —> Common ESP-related —> UART console baud rate

 menuconfig —> Component config —> Common ESP-related —> UART console baud rate


* 启动信息 [#k77f7617]

ESP8266 启动时会有如下打印:
#codeprettify{{
ets Jan 8 2013, rst cause:1, boot mode:(5,7)
}}

&ref(ESP8266_startup.png);

** rst cause 的说明 [#ye8a2e3a]

|值|枚举定义|意义|
|0|NO_MEAN|无意义|
|1|VBAT_REST|上电复位(电源重启)|
|2|EXT_SYS_RESET|外部复位 (deep-sleep 醒来)|
|3|SW_RESET|软件复位|
|4|WDT_RESET|硬件看门狗复位|
|5|DEEPSLEEP_TIMER_RESET|/|
|6|DEEPSLEEP_POWER_ON_RESET|/|

注意:~
软件 WDT 重启或者软件复位都会维持上次重启状态. 比如第一次是电源重启, rst cause 为 1, 软件复位后 rst cause 仍然为 1.


** boot mode 的说明 [#t815934d]

boot mode 由 strapping 管脚的 3 位值 [GPIO15, GPIO0, GPIO2] 共同决定. 如下表所示:

|boot mode|Strapping 管脚的 3 位值[GPIO15, GPIO0, GPIO2]|SDIO/UART 判断|意义|
|0|[0, 0, 0]|/|remap boot|
|1|[0, 0, 1]|/|UART boot|
|2|[0, 1, 0]|/|jump boot|
|3|[0, 1, 1]|/|fast flash boot|
|4|[1, 0, 0]|2|SDIO lowspeed V1 UART boot|
|5|[1, 0, 1]|2|SDIO lowspeed v2 uart boot|
|6|[1, 1, 0]|2|SDIO highspeed v1 uart boot|
|7|[1, 1, 1]|2|SDIO highspeed v2 uart boot|
|4-7|[1,0,0], [1,0,1], [1,1,0], [1,1,1]|非 2|SDIO boot|

boot mode 4~7 为 SDIO 的不同的协议标准, 包括低速 (lowspeed) 和高速 (highspeed), 版本号(V1, V2)等, 但并非所有 MCU 都会同时支持这些标准。


#hr();
コメント:
#comment_kcaptcha

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS