Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | SPI NOR flash memory

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

SPI NOR flash memory - ajellisuk - Aug 27 6:25:34 2008

Hi

I am using IAR PowerPAc filing system to access 2 SPI NOR flash
devices. I set up a project using the SPI flash driver supplied.
However I have a couple of issues:

The first issue is during the initialization process. I have observed
the following data bytes are written to the SPI bus 0xAB (wake up
from deep power down - which is ok), then 0x9F (read device id). The
problem is with the second byte. When I look at the data sheet for my
device (AMIC A25L16P) there are 4 bytes to be read to make up the
device id, but the FS only attempts to read 3 bytes so the FS doesn't
appear to read all of the info about the device. The info contain in
the device is:
Continuation ID: 0x7F
Manufacturer ID: 0x37
Memory type: 0x20
Memory capacity: 0x15 (bottom), 0x25 (top)

The second problem is that the FS keep giving me the message that it
cannot identify the device. I have hard coded the values above into
the read function as below:

/*********************************************************************
*
* FS_NOR_SPI_HW_X_Write
*
* Description:
* Reads a specified number of bytes from flash to buffer.
*
* Parameters:
* Unit - Device Index
* pData - Pointer to a data buffer
* NumBytes - Number of bytes
*
* Return value:
* void
*/
void FS_NOR_SPI_HW_X_Read(U8 Unit, U8 * pData, int NumBytes) {
do {
switch (NumBytes) {
case 3:
*pData = 0x7F;
break;

case 2:
*pData = 0x37;
break;

case 1:
*pData = 0x20;
break;

}
*pData++;// = _ReadWriteSPI(0xff);
} while (--NumBytes);

}

Could someone please shed some further light onto what my problems
could be?

Thanks

Andrew

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )