From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ladislav Michl Date: Mon, 26 Sep 2005 17:39:25 +0200 Subject: [U-Boot-Users] Testing rewrite of NAND code? In-Reply-To: References: <20050922094019.C15B8353A0B@atlas.denx.de> Message-ID: <20050926153925.GA6462@orphique> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Sep 26, 2005 at 04:52:13PM +0200, Mike Rapoport wrote: > When I tried to write data to the NAND flash using the command > => nand write.jffs2 400000 200000 400000 > > the system hanged right after printing: > "NAND write: device 0 offset 2097152, size 4194304 ... 4194304 bytes > written: OK" This is really strange. Code reads: i = strncmp(cmd, "read", 4) == 0; /* 1 = read, 0 = write */ printf("\nNAND %s: device %d offset %u, size %u ... ", i ? "read" : "write", nand_curr_device, off, size); if (i) ret = nand_read(nand, off, &size, (u_char *)addr); else ret = nand_write(nand, off, &size, (u_char *)addr); printf(" %d bytes %s: %s\n", size, i ? "read" : "written", ret ? "ERROR" : "OK"); return ret == 0 ? 0 : 1; So it seems nand_write returned sucessfuly. Could you debug it a bit more? Perhaps stack corruption? Thanks, ladis