ESP8266 下载模式 GPIO 研究
首先 找到ESP8266 的芯片手冊
https://www.espressif.com/zh-hans/products/hardware/esp8266ex/overview
ESP8266EX技術規格表
https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_cn.pdf
nodemcu/nodemcu-devkit-v1.0 管腳布局圖
https://github.com/nodemcu/nodemcu-devkit-v1.0
管腳布局
| 1 | VDDA | P | Analog Power 2.5V ~ 3.6V | |
| 2 | LNA | I/O | RF antenna interface Chip output impedance=39+j6 Ω. It is suggested to retain theπ-type matching network to match the antenna. | |
| 3 | VDD3P3 | P | Amplifier Power 2.5V ~ 3.6V | |
| 4 | VDD3P3 | P | Amplifier Power 2.5V ~ 3.6V | |
| 5 | VDD_RTC | P | NC (1.1V) | |
| 6 | TOUT | I | ADC pin. It can be used to test the power-supply voltage ofVDD3P3 (Pin3 and Pin4) and the input power voltage of TOUT(Pin 6). However, these two functions cannot be used simultaneously. | |
| 7 | CHIP_PU | I | Chip Enable High: On, chip works properly Low: Off, small current consumed | |
| 8 | XPD_DCDC | I/O | GPIO16 | Deep-sleep wakeup (need to be connected to EXT_RSTB);GPIO16 |
| 9 | MTMS | I/O | GPIO14 | HSPI_CLK |
| 10 | MTDI | I/O | GPIO12 | HSPI_MISO |
| 11 | VDDPST | P | Digital/IO Power Supply (1.8V ~ 3.6V) | |
| 12 | MTCK | I/O | GPIO13 | HSPI_MOSI; UART0_CTS |
| 13 | MTDO | I/O | GPIO15 | HSPI_CS; UART0_RTS |
| 14 | GPIO2 | I/O | GPIO2 | UART Tx during flash programming; |
| 15 | GPIO0 | I/O | GPIO0 | SPI_CS2 |
| 16 | GPIO4 | I/O | GPIO4 | |
| 17 | VDDPST | P | Digital/IO Power Supply (1.8V ~ 3.6V) | |
| 18 | SDIO_DATA_2 | I/O | GPIO9 | Connect to SD_D2 (Series R: 200Ω); SPIHD; HSPIHD; GPIO9 |
| 19 | SDIO_DATA_3 | I/O | GPIO10 | Connect to SD_D3 (Series R: 200Ω); SPIWP; HSPIWP; GPIO10 |
| 20 | SDIO_CMD | I/O | GPIO11 | Connect to SD_CMD (Series R: 200Ω); SPI_CS0; GPIO11 |
| 21 | SDIO_CLK | I/O | GPIO6 | Connect to SD_CLK (Series R: 200Ω); SPI_CLK; GPIO6 |
| 22 | SDIO_DATA_0 | I/O | GPIO7 | Connect to SD_D0 (Series R: 200Ω); SPI_MISO; GPIO7 |
| 23 | SDIO_DATA_1 | I/O | GPIO8 | Connect to SD_D1 (Series R: 200Ω); SPI_MOSI; GPIO8 |
| 24 | GPIO5 | I/O | GPIO5 | |
| 25 | U0RXD | I/O | GPIO3 | UART Rx during flash programming; GPIO3 |
| 26 | U0TXD | I/O | GPIO1 | UART Tx during flash programming; GPIO1; SPI_CS1 |
| 27 | XTAL_OUT | I/O | Connect to crystal oscillator output, can be used to provide BT clock input | |
| 28 | XTAL_IN | I/O | Connect to crystal oscillator input | |
| 29 | VDDD | P | Analog Power 2.5V ~ 3.6V | |
| 30 | VDDA | P | Analog Power 2.5V ~ 3.6V | |
| 31 | RES12K | I | Serial connection with a 12 kΩ resistor and connect to the ground | |
| 32 | EXT_RSTB | I | External reset signal (Low voltage level: active) |
啟動模式
GPIO2, GPIO0, and GPIO15 are configurable on PCB as the 3-bit strapping register that determines the
booting mode and the SDIO timing mode.
Flash Boot 的意思 應該是 從Flash啟動
串口
| UART0 | U0RXD | 25 | IO3 | U0RXD |
| UART0 | U0TXD | 26 | IO1 | U0TXD |
| UART0 | MTDO | 13 | IO15 | U0RTS |
| UART0 | MTCK | 12 | IO13 | U0CTS |
| UART1 | GPIO2 | 14 | IO2 | U1TXD |
| UART1 | SD_D1 | 23 | IO8 | U1RXD |
UART0 can be used for communication. It supports fluid control. Since UART1 features
only data transmit signal (Tx), it is usually used for printing log
By default, UART0 outputs some printed information when the device is powered on and booting up. The
baud rate of the printed information is relevant to the frequency of the external crystal oscillator. If the
frequency of the crystal oscillator is 40 MHz, then the baud rate for printing is 115200; if the frequency of
the crystal oscillator is 26 MHz, then the baud rate for printing is 74880. If the printed information exerts
any influence on the functionality of the device, it is suggested to block the printing during the power-on
period by changing (U0TXD, U0RXD) to (MTDO, MTCK).
外接SPI Flash
In the QUAD mode flash, 6 IO interfaces are used for flash communication.
In the DUAL mode flash, 4 IO interfaces are used for flash communication.
GPIO
NanoMCU 原理圖:
https://www.electrodragon.com/w/images/3/3b/NODEMCU_DEVKIT_V1.0.PDF
nRST 默認為高電平
GPIO0 默認為高電平
原來 DTR 和 RTS 的電平是可以在API控制的
看論壇上好多朋友都很疑惑DTR和RTS線控制電平的問題,我發表個人的見解:
mcuisp下載軟件所設置的DTR和RTS是針對RS232C接口的,而戰艦開發板上的DTR#和RTS#是CH340芯片輸出的。由于232芯片和CH340邏輯反向,因此CH340芯片上的DTR#和RTS#線應該和下載軟件上的設置取反。
然后我們看看下載過程:DTR#高電平—-RTS#低電平(BOOT0為1,同時RESET)—-DTR#低電平(釋放RESET)—-開始下載—-下載完成后兩條線恢復高電平,再次復位同時BOOT0=0,即可正常啟動。
http://www.openedv.com/posts/list/0/41396.htm
ESP8285解析
https://arduino-esp8266.readthedocs.io/en/latest/boards.html#generic-esp8266-module
芯片手冊:
https://www.espressif.com/sites/default/files/0a-esp8285_datasheet_en_v1.0_20160422.pdf
Generic ESP8285 Module
ESP8285 (datasheet) is a multi-chip package which contains ESP8266 and 1MB flash. All points related to bootstrapping resistors and recommended circuits listed above apply to ESP8285 as well.
Note that since ESP8285 has SPI flash memory internally connected in DOUT mode, pins 9 and 10 may be used as GPIO / I2C / PWM pins.
ESP8255 是芯片內部 封裝了一個ESP8266 和一個1MB的flash,對應的管腳pin8 之類的已經被占用了。
可以對應 ESP8266 外接一個1MB的SPI FLash的板子 正常使用,對等使用。
總結
以上是生活随笔為你收集整理的ESP8266 下载模式 GPIO 研究的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: uniapp聊天室动画加载新消息
- 下一篇: 我是这样克服拖延症的