This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Bad CRC during kernel boot in nand flash - omapl137

Hi guys,

My R+D group is working with an OMAP L-137 custom board based on Spectrum Digital EVM based in the same processor. Mainly, the most significant difference between both boards is the addition of a nand flash memory (MICRON MT29F16, 2GB, 4096KB page size) connected via EMIFA. So, the idea is the following:

  • FLash the SPI flash memory with the first three bootloaders (dsp-ubl, arm-ubl and uboot)
  • FLash the NAND flash memory with the kernel and a ramdisk FS through tftp server
To achieve that, I had to modify the pinmux configuration and define two statements in uboot source code (include/configs/da830evm.h):
#define CONFIG_USE_SPIFLASH
#define CONFIG_USE_NAND
I compiled uboot and I got the u-boot.bin file. After that, I flashed the spi flash memory by means the sfh_omapl137.exe. Everything was ok.
Once I powered on my custom board, I could see messages reporting me about what nand flash memory is detected and the same for spi flash memory. Therefore, I guessed I could do operations (read/write/erase) in both memories.
The next step was to copy the kernel and the ramdisk FS in the nand flash memory. For that, I followed the instructions of the  'http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot' page and download both files via tftp server and configure the environment variables (bootargs and bootcmd).
FS writing did not report me any error message but kernel writing did. Something like that: bad block table plus a address direction.. My opinion: I think that process copies the kernel file but I do not know if it does correctly, without errors...
Lastly, final step, when I write 'boot', I can see the following information:
Loading from nand0, offset 0x500000
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.37_bobIPNC_DM368n_4.0.0
   Created:      2013-07-17  16:29:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3439968 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
Looking for information to solve this problem, I have seen a high quantity of colleague's posts with problems similar to these. Following some "solutions" of that post, many people think that issue could be involved with the ECC architecture of nand flash memory. I dumped by means a uboot command (md 6800 0000) the register contents where EMIFA is mapped and I saw in the NANDFSR register that its value indicated me that four error bytes were detected and could not be corrected. Any suggestion for solving this problem??
Maybe the ECC is not working properly?? Maybe an additional software configuration would be necessary?
HELP!! I am stuck since two weeks ago..
THanks in advance
Regards
Óscar