2012-05-14 11:47 PM
Hi all,
Now, I'm trying to implement nand driver of SAMSUNG K9K8G08U0D (SLC, 1GBYTE) on STM32F205ZG cpu. However, it not easy to do it. First, reading device ID is OK. Second, block erase function is also OK. But, read & write operation is not OK. For example, If I write 0x66 all in one page (2048Byte) and check it has been saved ok, data may be randomly saved. Moreover, If I read erased page, first 2 or 3 bytes are ''0x30'' or ''0x33'' and remaing bytes are all ''0xFF''. I also have hard time to set parameters below. I tried to find values for parameter refering to AN2784 and applied to them but It didn't work well, either. p.FSMC_SetupTime = 32;//12;//1; p.FSMC_WaitSetupTime = 64;//64;//15;//3; p.FSMC_HoldSetupTime = 48;//48;//12;//2; p.FSMC_HiZSetupTime = 32;//24;//3;//1; If you have a tip, please answer. Thanks.2012-05-15 01:58 AM
Assuming your layout is o.k. (no reflections on the bus) and given the info provided, I would suggest the following:
1. Using a scope or a logic analyzer, check how fast you actually drive your flash device, and compare it with the spec. 2. Try with settings significantly slower than the spec limits, say, one magnitude (x10). If you have working settings, you can optimize for speed later on.2012-05-16 06:40 AM
Agreeing to what ''fm'' suggested, let me put some more comments
1. Pls check 16b or 8b mode of FSMC. The NAND i believe is 8b. i dont remember but i guess the commands are all 8b 2. Check your ReadPage function. 3. What is the distance between mcu and NAND ? Hope they are not too far.