C语言为ARM的IAR,使用NXP LPC2478和Microchip NAND Flash SST39VF3201C [英] C in IAR for ARM, using NXP LPC2478 with Microchip NAND Flash SST39VF3201C

查看:93
本文介绍了C语言为ARM的IAR,使用NXP LPC2478和Microchip NAND Flash SST39VF3201C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很抱歉我的问题,但我需要帮助在LPC2478和NAND Flash SST39VF3201C上配置EMC,我可以将数据写入闪存。



NAND闪存连接到LPC2478引脚,表底:

LPC2478引脚 - 到 - NAND闪存SST39VF3201C

P4.0 [A0] - 到 - A0

...................

P4.20 [A20] - 至 - A20



P4.21 [A21] - 至 - NC

P4.24 [OE] - 至 - OE

P4.25 [WE] - 至 - 我们

P4.30 [CSO] - 到 - CE



P3.0 [DO] - 到 - DQ0

...................

P3.0 [D15] - 至 - DQ15





所以,我有代码,我在IAR for ARM(C语言)中写道:



 PINSEL4& = ~0xF0000000; 
PINSEL4 | = 0x50000000;
PINSEL5& = 0x000C00C0;
PINSEL5 | = 0x05015515;
PINSEL6 = 0x55555555;
PINSEL8 = 0x55555555;
PINSEL9 = 0x50555555;

PCONP | = 0x00000800;

EMCCONTROL = 0x00000001;
EMCSTATICEXTENDEDWAIT = 0x00;

EMCSTATICWAITWEN0 = 0x00;
EMCSTATICWAITOEN0 = 0x01;
EMCSTATICWAITRD0 = 0x01;
EMCSTATICWAITPG0 = 0x1F;
EMCSTATICWAITWR0 = 0x1F;
EMCSTATICWAITTURN0 = 0x0F;
EMCSTATICCNFG0 = 0x00000081;



我配置了LPC2478,但我不确定我是否写得正确。

我编写代码后将数据保存在内存中:



 iD = *((unsigned int *)0x80000000); 
*((unsigned int *)0x80000000)= 0x09;
iD = *((unsigned int *)0x80000000);





但是当我在内存中保存数据并阅读本文时内存数据所有时间显示我 4294967295 类型为整数



我很抱歉我的英语。



我非常需要帮助。

解决方案

你读取的值0xff是你没有设备驱动总线的结果。这意味着未选择设备(或未启用输出或未启用读取,或全部一起)。问题是硬件。

在平面字中,设备未通过寻址启用。

OE(输出使能)和CE(芯片使能)的引脚无效当地址0x80000000。

我不能深入这个HW,因为我不知道它,没有时间阅读它,但基本上这是一个硬件问题。

I am sorry for my question but i need help with configure EMC on LPC2478 and NAND Flash SST39VF3201C that-be i can write data to flash memory.

NAND flash memory connected to LPC2478 pins, the table bottom:
LPC2478 Pins - to - NAND Flash SST39VF3201C
P4.0[A0] - to - A0
...................
P4.20[A20] - to - A20

P4.21[A21] - to - NC
P4.24[OE] - to - OE
P4.25[WE] - to - WE
P4.30[CSO] - to - CE

P3.0[DO] - to - DQ0
...................
P3.0[D15] - to - DQ15


So, i have code wich i wrote in IAR for ARM (language C):

PINSEL4 &= ~0xF0000000;
PINSEL4 |= 0x50000000;
PINSEL5 &= 0x000C00C0;
PINSEL5 |= 0x05015515;
PINSEL6 = 0x55555555;
PINSEL8 = 0x55555555;
PINSEL9 = 0x50555555;

PCONP |= 0x00000800;

EMCCONTROL = 0x00000001;
EMCSTATICEXTENDEDWAIT = 0x00;

EMCSTATICWAITWEN0 = 0x00;
EMCSTATICWAITOEN0 = 0x01;
EMCSTATICWAITRD0  = 0x01;
EMCSTATICWAITPG0  = 0x1F;
EMCSTATICWAITWR0  = 0x1F;
EMCSTATICWAITTURN0= 0x0F;
EMCSTATICCNFG0    = 0x00000081;


I was configure LPC2478, but i not sure that i wrote right.
After i wrote code wich save data at memory:

iD = *((unsigned int *)0x80000000);
*((unsigned int *) 0x80000000) = 0x09;
iD = *((unsigned int *)0x80000000);



But when i am save data in memory and read this memory data all time show me 4294967295 in type integer

I am sorry for my English.

I very need HELP.

解决方案

The value you read, 0xff, is what you get when there is no device driving the bus. This means that the device is not selected (or output not enabled or read not enabled, or all together). The problem is hardware.
In plane words the device is not enabled by the addressing.
The pins for OE (output enable) and CE (Chip Enable) are not active when the address 0x80000000.
I can't go very deep this HW because I don't know it and don't have time to read about it, but basically this is an HW problem.


这篇关于C语言为ARM的IAR,使用NXP LPC2478和Microchip NAND Flash SST39VF3201C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆