Hi, Has anyone tried to erase 2GB NAND flash on Tiny6410, i tried to do it but it is giving me the below error. Can any please help me in giving the right syntax for nand erase. I had tried to load my modified u-boot, i could do the tftpboot on the load location c0008000 on RAM, but wanted to write it back to flash. As a process first we need to erase the flash, but it is failing with the below error. Please reply if any one knows how to erase. Thanks in advance TINY6410 # nand erase 0 40000 NAND erase: device 0 offset 0x0, size 0x40000 off size: 00000000 00040000 offset and size should be multiple of block size ERROR TINY6410 #
nand erase fail on Tiny6410-2GB flash
You must always erase a full block. Check the datasheet of the NAND flash, to get an idea how large a block is for this type of NAND.
Thanks Juergen Beisert, I will look into it and update. But one information i found while i was going through the u-boot code, where Friendly Arm team has introduced new set of MLC type Flash and modified the nand flash code and it was bit confusing, wanted to know the value of "NandBlockSizeInByte". can you please help to throw some light on this. Below is section of code in u-boot source file(in the file cmd_nand.c) if (NandIsMlc()) { printf("off size: %08X %08X\n", off, size); if (off % NandBlockSizeInByte != 0 || size % NandBlockSizeInByte != 0) { puts("offset and size should be multiple of block size\n"); ret = -1; } else { ret = FriendlyARMFormat(off / NandBlockSizeInByte, off / NandBlockSizeInByte + size / NandBlockSizeInByte - 1, scrub); } } else Rds Chechu.
The 2 GiB flash is very special. Its page size is 8 kiB, its block size is 1 MiB. And this flash needs a very special handling to enable the S3C6410 CPU booting from it (because the internal ROM code inside the S3C6410 CPU can only handle page sizes up to 4 kiB).
Juergen Beisert, Really thankful for your inputs. Is there a method to handle this, all I need to do is, erase the flash for the specified region. I believe there has to be one,but only that I am not aware.:-) I will investigate further.
do yuo solve the problem:offset and size should be multiple of block size ERROR TINY6410 # can yuo tell me