问题描述
我很抱歉我的问题,但我需要帮助在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 类型为整数
我很抱歉我的英语。
我非常需要帮助。
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.
这篇关于C语言为ARM的IAR,使用NXP LPC2478和Microchip NAND Flash SST39VF3201C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!