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

管脚布局

这里写图片描述

管脚号名称类型管脚功能
1VDDAPAnalog Power 2.5V ~ 3.6V
2LNAI/ORF antenna interface Chip output impedance=39+j6 Ω. It is suggested to retain theπ-type matching network to match the antenna.
3VDD3P3PAmplifier Power 2.5V ~ 3.6V
4VDD3P3PAmplifier Power 2.5V ~ 3.6V
5VDD_RTCPNC (1.1V)
6TOUTIADC 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.
7CHIP_PUIChip Enable High: On, chip works properly Low: Off, small current consumed
8XPD_DCDCI/OGPIO16Deep-sleep wakeup (need to be connected to EXT_RSTB);GPIO16
9MTMSI/OGPIO14HSPI_CLK
10MTDII/OGPIO12HSPI_MISO
11VDDPSTPDigital/IO Power Supply (1.8V ~ 3.6V)
12MTCKI/OGPIO13HSPI_MOSI; UART0_CTS
13MTDOI/OGPIO15HSPI_CS; UART0_RTS
14GPIO2I/OGPIO2UART Tx during flash programming;
15GPIO0I/OGPIO0SPI_CS2
16GPIO4I/OGPIO4
17VDDPSTPDigital/IO Power Supply (1.8V ~ 3.6V)
18SDIO_DATA_2I/OGPIO9Connect to SD_D2 (Series R: 200Ω); SPIHD; HSPIHD; GPIO9
19SDIO_DATA_3I/OGPIO10Connect to SD_D3 (Series R: 200Ω); SPIWP; HSPIWP; GPIO10
20SDIO_CMDI/OGPIO11Connect to SD_CMD (Series R: 200Ω); SPI_CS0; GPIO11
21SDIO_CLKI/OGPIO6Connect to SD_CLK (Series R: 200Ω); SPI_CLK; GPIO6
22SDIO_DATA_0I/OGPIO7Connect to SD_D0 (Series R: 200Ω); SPI_MISO; GPIO7
23SDIO_DATA_1I/OGPIO8Connect to SD_D1 (Series R: 200Ω); SPI_MOSI; GPIO8
24GPIO5I/OGPIO5
25U0RXDI/OGPIO3UART Rx during flash programming; GPIO3
26U0TXDI/OGPIO1UART Tx during flash programming; GPIO1; SPI_CS1
27XTAL_OUTI/OConnect to crystal oscillator output, can be used to provide BT clock input
28XTAL_INI/OConnect to crystal oscillator input
29VDDDPAnalog Power 2.5V ~ 3.6V
30VDDAPAnalog Power 2.5V ~ 3.6V
31RES12KISerial connection with a 12 kΩ resistor and connect to the ground
32EXT_RSTBIExternal 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启动

这里写图片描述

串口

串口号管脚名称管脚号IO类型功能
UART0U0RXD25IO3U0RXD
UART0U0TXD26IO1U0TXD
UART0MTDO13IO15U0RTS
UART0MTCK12IO13U0CTS
UART1GPIO214IO2U1TXD
UART1SD_D123IO8U1RXD

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
这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

MATTERS NEEDING ATTENTION
On every boot/reset/wakeup,
GPIO15 MUST keep LOW, GPIO2 MUST keep HIGH.
GPIO0 HIGH ->RUN MODE, LOW -> FLASH MODE.
When you need to use the sleep mode,GPIO16 and RST should be connected,
and GPIO16 will output LOW to reset the system at the time of wakeup.

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的板子 正常使用,对等使用。

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值