我是靠谱客的博主 柔弱小土豆,最近开发中收集的这篇文章主要介绍esp8266 Flash Memory Map,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

看了一下esp-open-sdk,Cache_Read_Enable()是boot rom 提供的api,lx106-hal有cache源码,下一步再研究具体怎么实现

1 Flash Memory Map
Map the flash

/*
 * Memory map first 8Mbit of flash
 * address space is: 0x4020 0000 - 0x402F FFFF
 */
Cache_Read_Enable (0, 0, 0);
 */

Unmap the flash

Cache_Read_Disable();

2 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.

Reference http://wiki.jackslab.org/ESP8266_Flash#Cache_Read_Enable

最后

以上就是柔弱小土豆为你收集整理的esp8266 Flash Memory Map的全部内容,希望文章能够帮你解决esp8266 Flash Memory Map所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部