Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Anybody implement NAND flash driver on LPC210x ?

2004-04-04 by Charles Manning

On Friday 02 April 2004 17:46, berrycake33 wrote:

> We had considered NAND control pins,
> they are posited on the rest pins.
> For easy implementing the NAND flash driver,
> we'd like to put NAND data pins in a byte alignment.

Byte alignment is not really a big issue. When you read/write the GPIO all 
this costs extra is an extra shift (which is a cheap operation - free in many 
cases on ARM).

You do however want your pins to be consecutive if possible (ie D0=P0.n... 
D7=P0.n+7)

> That would save some instructions, although the Philips Set-Clear
> GPIO operation already costs more instructions to implement data I/O.
> ( anybody know that why Philips uses this kind of GPIO operation
> instead of direct setting 0 or 1 ? )

This is one of the first things that really seemed stupid the firt time I 
looked at a micro that had set/clear registers. However it is actually very 
efficient for cases where a register is used from multiple threads of 
execution (eg. main loop and an interrupt service routine).
With set/clear, you just go ahead and set or clear pins. If you did not have 
this you'd need to use a shadow register and disable/enable interrupts which 
gets far more costly.


>
> As for I2C and SPI, we use I2C for LCD and SPI for SD Card.
> Besides, we need to transfer data from NAND to SD Card.

OK, I'll bite.

Since you have to support SD card anyway, why not just use a second SD card 
instead of the NAND?

-- Charles

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.