查看ESP8266 Flash的源代码
←
ESP8266 Flash
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== 概述 == 4KB 为一个扇区 (Sector), The last 16 sectors is the paramter area! 1MB flash is start at 0xF0000 4MB flash is start at 0x3F0000 <br> === 系统参数区 (System param) === 始终为 Flash 的最后 16KB * 4KB 为初始化射频参数 (esp_init_data_default.bin),4MB Flash 为:0x3FC000 - 0x3FDFFF (The last sector 12) * 4KB 为初始化系统参数 (blank.bin),4MB Flash 为:0x3FE000 - 0x3EFFFF (The last sector 14) 皆由 SDK 提供 <br> === 用户参数区 (User param) === 指 Espressif 提供的示例 (IOT_Demo / AT) 中设定的用户参数区 iBaihe 的参数: 0x3C * 4KB = 0x3C000 COS Platform 参数: (0x3C + 1) * 4KB = 0x3D000 (SAVE_0) (0x3C + 2) * 4KB = 0x3E000 (SAVE_1) (0x3C + 3) * 4KB = 0x3F000 (PARAM_FLAG) <br><br> == Layout Without OTA == [[文件:Esp8266-flash-layout-no-ota.png]] [[文件:Esp8266-flash-layout-no-ota-4m.png]] [[文件:Esp8266-flash-layout-no-ota-512.png]] [[文件:Esp8266-flash-layout-no-ota-1024.png]] [[文件:Esp8266-flash-layout-no-ota-4096.png]] <pre> Address Size Name Description 00000h 4k boot.bin Bootloader 3C000h 14k Param Start Sector 3D000h 1x4k Param Saved 0 3E000h 1x4k Param Saved 1 3F000h 1x4k Param Flag 40000h 240k app.v6.irom0text.bin SDK libraries 7C000h 8k esp_init_data_default.bin Default configuration 7E000h 8k blank.bin Filled with FFh. May be WiFi configuration </pre> <br><br> == Layout With OTA == === 512 和 1024KB === [[文件:Esp8266-flash-layout-ota.png]] [[文件:Esp8266-flash-layout-ota-512.png]] [[文件:Esp8266-flash-layout-ota-1024.png]] <br> === 4096KB === [[文件:Esp8266-flash-layout-ota-4m.png]] [[文件:Esp8266-flash-layout-ota-4096.png]] <br><br> == SPI Flash Format == * http://esp8266-re.foogod.com/wiki/SPI_Flash_Format <br><br> == SPI Flash Mode == * QIO , for flash that support quad r/w operation(e.g. W25Q) * QOUT, for flash that support quad read operation(e.g. W25Q) * DIO, for flash that support dual r/w operation(e.g. W25Q &W25X) * DOUT, for flash that support dual read operation(e.g. W25Q &W25X) 经测试: * Winbond 25Q32B 可工作于 DIO / DOUT / QIO /QOUT (Noduino Falcon) * BergMicro 25Q32A 只可工作于 DIO / DOUT (NodeMCU V1.0 可能是 ESP-12E 接线的问题) * MXIC 25L80 (小 K mini)只可工作于 DOUT <br><br> == Flash Memory Map == ;; Map the flash: <source lang=c> /* * Memory map first 8Mbit of flash * address space is: 0x4020 0000 - 0x402F FFFF */ Cache_Read_Enable (0, 0, 0); </source> ;; Unmap the flash: <source lang=c> Cache_Read_Disable(); </source> <br><br> === Cache_Read_Enable === void Cache_Read_Enable(uint8 odd_even, uint8 mb_count, unt8 no_idea); Valid values for odd_even: 0 – clears bits 24 & 25 of control register 0x3FF0000C 1 – clears bit 24, sets bit 25 other – clears bit 25, sets bit 24 Function of odd_even: 0 – allows access to even numbered mb 1 – allow access to odd numbered mb other – appears to do the same as 1, there must be a difference but I haven’t worked out what it it Valid values for mb_count: 0-7 – set bits 16, 17 & 18 of control register 0x3FF0000C Function of mb_count: Which odd or even bank to map (according to odd_even option) e.g. mb_count = 0, odd_even = 0 -> map first 8Mbit of flash e.g. mb_count = 0, odd_even = 1 -> map second 8Mbit of flash e.g. mb_count = 1, odd_even = 0 -> map third 8Mbit of flash e.g. mb_count = 1, odd_even = 1 -> map fourth 8Mbit of flash Valid values for no_idea: 0 – sets bit 3 of 0x3FF00024 1 – sets bit 26 of 0x3FF0000C and sets bits 3 & 4 of 0x3FF00024 Function of no_idea: The clue is in the name, I can’t work out what this does from my experiments, but the SDK always sets this to 1. * Reverse engineered by Richard Burton: http://richard.burtons.org/2015/06/12/esp8266-cache_read_enable/ <br><br> == Reference == * https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=en&density=8Mbit(1MB)#density <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
返回到
ESP8266 Flash
。
个人工具
3.15.185.34
该IP地址的讨论
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面