For further information I'm still workin on It with no results:
U-boot reads and writes from NAND but only ONCE.
The problem appears when I write from other origin than the first one. Then, when I try to read form NAND I've got an -74 error, and this error still appears until NAND is erased.
For example if I execute
->nand write 30000 0 200
NAND write: device 0 offset 0x0, size 0x200
512 bytes written: OK
NAND read: device 0 offset 0x0, size 0x200
512 bytes read: OK
->nand write 30000 200 200
NAND write: device 0 offset 0x200, size 0x200
512 bytes written: OK
NAND read: device 0 offset 0x200, size 0x200
512 bytes read: OK
You can see that there's no problem but the original address is the same in both instructions. But If I chanche this address:
->nand write 30000 0 200
NAND write: device 0 offset 0x0, size 0x200
512 bytes written: OK
NAND read: device 0 offset 0x0, size 0x200
512 bytes read: OK
->nand write 30400 200 200
NAND write: device 0 offset 0x200, size 0x200
512 bytes written: OK
NAND read from offset 200 failed -74
0 bytes read: ERROR
It's the same If I do the second writting on any address, trying the 0 addres or also over the erasing block (every 0x4000) with no result. I've been taking a look at the source code, but just befor the "write byte to memory" instruction every data is correct. And after "read byte from memory" this bytes are wrong!
I thougth that NAND was broken but managing it from uClinux I can create a jffs2 file system, write and read without any problem.
I would appreciate any help.
Thanks in advance.