AnsweredAssumed Answered

NANDFLASH Usage PROBLEM with BF-548

Question asked by sachin@eilabs.co.in on Dec 22, 2012
Latest reply on Jan 24, 2013 by Prashant

Dear all ,

 

in our custom board , we are using MT29F32G08AFACA , the respective configurations that i use ,

 

#define NAND_PAGE_SIZE          4096    /* NAND flash page size excluding spare area */

#define NAND_PAGES_PER_BLOCK    128      /* number of pages in a NAND flash block */

/* block size in bytes, excluding spare area */

#define NAND_BLOCK_SIZE         NAND_PAGE_SIZE*NAND_PAGES_PER_BLOCK

#define NAND_NUM_BLOCKS     8192    /* number of blocks in the device */

/* NAND size in bytes, excluding spare area */

#define NAND_DEVICE_SIZE        NAND_BLOCK_SIZE*NAND_NUM_BLOCKS

NAND_READ     = 0x00, NAND_READ_CONFIRM      = 0x30,

/* page program commands */

  NAND_PROGRAM     = 0x80,          NAND_PROGRAM_CONFIRM  = 0x10,

/* erase commands */

  NAND_BLOCK_ERASE   = 0x60,          NAND_BLOCK_ERASE_CONFIRM    = 0xD0,

NAND_RESET    = 0xFF,            NAND_READ_STATUS      = 0x70

 

According to the data sheet , the page size is 4k ( 4096 bytes ) , but when iam doing DMA ( with dma count 0x200  ,( rx ant tx ) buffer size 4096 bytes ) it hangs with the waiting status to complete the dma transfer ( dma done ) ,but if i give dma count 0x80 it works with some errors ( attached pics ) , i.e after erasing of the defined block if i read the rx_buff shows 30 , 30 and last few bytes FF ( pic : read_after erase) , and when iam writing 0x80 count bytes and reading it , then it use to show me 30, 30 , for the full buffer and some data at the last few bytes ( pic read_after_write ) .

 

iam using the source code given in power on self test in bf548 (TEST_NAND) .

please tell me where iam wrong , iam attaching the source code with this .

Attached things

1 - pics read_after_erase , read_after_write

2 - datasheet of the nandflash memory

3 - source code used to test the nand

 

Thanks and regards

SACHIN PATIL

EILABS

Outcomes