请教:用过NorFlash-S29GL064的大虾
- UID
- 844286
|
请教:用过NorFlash-S29GL064的大虾
S29GL064N90TFI04:R4模式。
在ARM下写入读取ID命令,代码如下:
volatile unsigned short *baseAddress = (volatile unsigned short *) pFlash->pFlashInfo->baseAddress;
unsigned int id;
//* Enter Software Product Identification Mode
*(baseAddress + FLASH_SEQ_ADD1) = FLASH_CODE1;
*(baseAddress + FLASH_SEQ_ADD2) = FLASH_CODE2;
*(baseAddress + FLASH_SEQ_ADD1) = ID_IN_CODE;
//* Read Manufacturer and device code from the device
id = (short) *baseAddress;
id |= *(baseAddress+1) << 16;
//* Exit Software Product Identification Mode
*(baseAddress + FLASH_SEQ_ADD1) = ID_OUT_CODE;
return id;
baseAddress 为0x10000000,ARM片选NCS0.
结果读出来的id是0x00900090,单步显示:每写入一条命令指令,通过AXD读出来的Flash的内容都随着指令码而改变,譬如写入FLASH_CODE1,Flash内容随之变成0x55,FLASH_CODE2变成0xAA,ID_IN_CODE变成0x0090,故最后读取的id为0x00900090.不知何解啊?有没有高手解答解答的?非常感谢了。
另:
FLASH_SEQ_ADD1为0x555,FLASH_SEQ_ADD2为0x2AA。 |
|
|
|
|
|
- UID
- 844286
|
|
|
|
|
|
- UID
- 844286
|
从ROM启动的时候上面的代码可以读到Flash的ID,这说明读取ID的程序是没有问题的。问题出在ARM初始化上,高手们解答解答:对这款Flash初始化要注意什么问题哈?我的初始化程序是以前用来初始化SST39VF6401B的。 |
|
|
|
|
|