Appearance
Flash W25Q64
Flash
常用的存储器件, 有一个物理特性就是只能写0, 不能写1, 可以进行擦除
主要有两种, NOR Flash 和NAND Flash
FLashW25Q64
8M字节, nor flash, 支持双线和四线SPI, 标准模式104Mbit/s
DO: MISO
DI: MDIO
/CS: 片选
/WP: 写保护
/HOLD: 暂停通讯
CLK: 时钟
Standard SPI instructions use the unidirectional DI (input) pin to serially write instructions, addresses or data to the device on the rising edge of the Serial Clock (CLK) input pin. Standard SPI also uses the unidirectional DO (output) to read data or status from the device on the falling edge CLK. (可以使用模式0或者模式3)
W25Q64分为128个块, 每个块64kb, 块又分为16个扇区, 每一个4kb, 在写入的数据之前需要进行擦除, 只能把为1的数据位改为0, 擦除的时候只能按照最小的单元进行, 在写入的时候没有限制, 为nor Flash, nand Flash需要以扇区进行写入
擦除的时候单位可以是扇区, 块, 或者整个片
写的时候是页写
有一个状态寄存器, BUSY位为忙状态
- 实际读写
带括号的为返回值
擦除, 0x20之后发送三字节的地址
写入, 0x02
几个id可以读取, 用来验证是否连接成功
开发板情况
指南者CS连接PC0
QSPI模式
QE位就是控制是不是使用的QSPI模式
四字节地址使用的是W25Q256, 使用32位的地址