Read/nBusy via interrupt
Aras Vaichas
arasv at magellan-technology.com
Thu Oct 28 19:43:09 EDT 2004
Ben Dooks wrote:
> Does anyone here have any comments over the pros/cons of using
> an interrupt which goes off to wait for a NAND flash ready/not-busy
> signal?
>
pros of using interrupt:
* faster MTD access (maybe, depends on polling rate) but as a percentage of
total access time it probably doesn't make much difference.
* less cpu overhead
cons of using interrupt:
* more pins used up on CPU
* more code to write and debug!
* more interrupts going off in system
* more pins needed on MTD -> more expensive boards and chips, longer board
design times
I'll give you an example from a hardware point of view by way of the Atmel
Dataflash AT45DB081B.
http://rocky.digikey.com/WebLib/Atmel/Web%20Data/AT45DB081B.pdf
http://www.atmel.com/dyn/products/product_card.asp?family_id=616&family_name=DataFlash%26reg%3B&part_id=2470
The Atmel Dataflash is bootable by the AT91RM9200, and is actually a NOR part
made to look like a serial NAND.
If you take a look at the 8-CASON part, you'll notice that in order to reduce
pin count, they leave out the ready/nbusy signal because this information can
be obtained by polling. This is really a matter of board space as you can fit
1Megabyte of bootable FLASH into a surface mount 8pin package by leaving out
this pin.
If you wanted to improve performance, you would simply find out how long the
MTD usually stays busy for and only resume polling after that time.
If you can spare the board space, why not use interrupts? Make it a kernel
option. MTD_EADYNBUSY_INTERRUPT ?
Aras Vaichas
More information about the linux-mtd
mailing list