新路程------hi3516a uboot更换spi flash(1)

  按照官方说法,移植uboot需要修改xls里的flash那栏,我们换的flash是MX25L25635FMI,看看各个参数

上面有很多例子了


看来只要配

namejedec_idext_idblock_sizechip_sizeclkchip select
mx25l1655d0xc2 0x26 0x150x06553620971520x401001

就可以了

1. name是MX25l25635F


2. jedec_id是

RDID Command manufacturer ID memory type memory density
C2 26 15   //就是这个
RES Command electronic ID
26
REMS/REMS2/REMS4/
Command
manufacturer ID device ID
C2 26

所以我们的是

RDID 9Fh Manufactory ID Memory type Memory density
C2 20 19


3. ext_id不知是啥,spec中唯一提到的是

8-1. 256Mb Address Protocol
The original 24 bit address protocol of serial Flash can only access density size below 128Mb. For the memory
device of 256Mb and above, the 32bit address is requested for access higher memory size. The MX25L25635F
provides three different methods to access the whole 256Mb density:
(1)Command entry 4-byte address mode: Issue Enter 4-Byte mode command to set up the 4BYTE bit in
Configuration Register bit. After 4BYTE bit has been set, the number of address cycle become 32-bit.
(2)Extended Address Register (EAR): configure the memory device into two 128Mb segments to select which one
is active through the EAR bit “0”.
(3)4-byte Address Command Set: When issuing 4-byte address command set, 4-byte address (A31-A0) is
requested after the instruction code. Please note that it is not necessary to issue EN4B command before issuing
any of 4-byte command set.

就是说如果要分成两半访问,则要利用ear寄存器而已


4. block_size是65536。spec是这么写的

Program command is executed on byte basis, or page (256
bytes) basis, or word basis for erase command is executed on sector (4K-byte), block (32K-byte), or block (64K-byte),
or whole chip basis.有32k也有64k


5. chip_size

这个例子里的spec上写了16M:16,777,216 x 1 bit structure,而16777216/8正好是2097152,所以我们的mx25l256的size是16m的16倍,则是33554432


6. clk应该是外面提供的一样0x40100


7. chipselect 也是1

到此为止完成了xls的修改,接下来看uboot里的spi flash 流程


  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值