Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 10-Jul-15 0:22am
v2
Comments
KarstenK 10-Jul-15 4:29am    
than you havent written to that memory. I find writing to some fixed address strange. I'd rather would write in a variable, struct or deref a pointer to write on that var. But I got no clue about ARM.
Member 11379090 10-Jul-15 4:59am    
Yes, i write structure in pragma location.
#define ADDR_BANK_DEVICES_RAM_M 0x80000000
#pragma location = ADDR_BANK_DEVICES_RAM_M
__no_init DEVICE devices_tmp[COUNT_DEVICES];
But data not changing.

devices_tmp[0].status = 0x09;
iD = devices_tmp[0].status;

And i have 0xFF

1 solution

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.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900