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.

AM3517: Writing 4-bit BCH-ECC with Lauterbach

Hello,

 

I want to write uboot.bin to nandflash with the lauterbach debugger. That works but i can not write the 4-bit BCH-ECC to the spare-area.

 

A solution would be to generate the ECC on the PC an write it with the debugger into the nandflash spare area. But i did not find a tool to generate the 4-bit BCH ECC.

 

I tried to make one by myself but did not find a detailed description about calculating the ECC. Informations like used polynom ... would be neccessary.

 

Thank you for your help.

  • Any specific reason, why you want to flash it using lauterbach only? Since u-boot itself supports BCH4 ECC schema, you can verywell download u-boot into DDR memory and run u-boot. Then from u-boot prompt you can chose ecc schema and flash u-boot.bin to NAND.

    Thanks,

    Vaibhav

  • You´re right that is possible if you are having a running u-boot.  But i want to run u-boot on our own board. Flashing u-boot into NAND with u-boot does not work, yet.

  • Are you hoping to use the JTAG to prove the hardware is sane, if the data is written outside of U-Boot (and thus you have a software bug in u-boot to solve) ?  If you can't load u-boot into DDR memory and then use that to write to flash you might well have problems with whatever is to be loading u-boot from NAND itself too (I'm assuming your path goes romcode->first stage loader (for example x-loader) -> second stage loader (for example u-boot).

  • In the meantime it is possible to write u-boot by itself to the nand-flash. Some adjustments in the gpmc settings solved this problem.

    But i am still interested to do this the comfortable way that means with a lauterbach script. This would be a big advantage especially when i have to program a bigger count of modules.

     

    Thank you for your answers!

    (Sorry for the long time since my last post, some urgent projects interrupted this one.)

  • Hello ,

    My suggestion is, why don't you try using flash tool to flash u-boot image into the nand flash.

    There also you 'll get choosing different ecc options i.e 1-bit, 4-bit, 8-bit ecc.

    Just try with this, just you need to set all the gpmc registers required for nand timings by refering nand datasheet.

     

    Regards,

    santosh vastrad

     

  • Hello Santosh Vastrad,

    We have no switches on our module to change the boot-pin states. So i would have to pick my soldering iron to change these. I don´t want to do that.

    Thanks anyway!