ESP8266-S2 serial-flasher-HSPI流程

本文详细介绍了ESP8266-S2的SPI闪存引脚配置和S2流程,通过esptool.py v2.0设置SPI连接参数,包括UART0波特率的配置和HSPI时序的调整。

ESP8266-S2

SPI flash pins

SPI_PAD_CONFIG_CLK     Override SD_CLK pad (GPIO6/SPICLK)                = 0 R/W (0x0)
SPI_PAD_CONFIG_Q       Override SD_DATA_0 pad (GPIO7/SPIQ)               = 0 R/W (0x0)
SPI_PAD_CONFIG_D       Override SD_DATA_1 pad (GPIO8/SPID)               = 0 R/W (0x0)
SPI_PAD_CONFIG_HD      Override SD_DATA_2 pad (GPIO9/SPIHD)              = 0 R/W (0x0)
SPI_PAD_CONFIG_CS0     Override SD_CMD pad (GPIO11/SPICS0)               = 0 R/W (0x0)
self.write_reg(0x3FF00028, 2, 2)
self.write_reg(0x60000800, 0, 0x300)
self.write_reg(0x60000804, 0x20, 0x130)
self.write_reg(0x60000808, 0x20, 0x130)
self.write_reg(0x6000080C, 0x20, 0x130)
self.write_reg(0x60000810, 0x20, 0x130)

esptool.py v2.0 now supports a command line argument to configure the SPI connection parameters on ESP32. The --spi-connection HSPI option does not work on ESP8266, but it could probably be made to work by making register writes as shown above.

S2 流程

c0 00 08 24  00 00 00 00  00 07 07 12  20 55 55 55 55 55 55 55  55 55 55 55  55 55 55 55  55 55 55 55  55 55 55 55  55 55 55 55  55 55 55 55  55 c0
01 08 02 00  07 07 12 20 00 00 c0

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-qA9JeEFx-1589110578940)(/home/songjiaxiu/.config/Typora/typora-user-images/1587369153149.png)]

self.write_reg(0x3FF00028, 2, 2)
self.write_reg(0x60000800, 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值