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.

Dm8168 nand flash u-boot couldn't saveenv problem

I have flash my u-boot.noxip.bin into nand flash via nand-flash-writer ,

but env-parameters can't be saved ,when I want to load uImage through tftp,and file-system through nfs,

the message logs are as following:

Net: <ethaddr> not set. Reading from E-fuse
Detected MACID:0:18:31:e6:e0:a4
Ethernet PHY: GENERIC @ 0x01
DaVinci EMAC
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
** Can't read from device 0 **

** Unable to use mmc 0:1 for fatload **
In case ENV on MMC/SD is required
Please put a valid script named boot.scr on the card
Refer to the User Guide on how to generate the image
TI8168_EVM#setenv ethaddr 00:0c:29:4a:95:8b
TI8168_EVM#setenv bootargs 'console=ttyO2,115200n8 root=/dev/nfs nfsroot=192.168.1.108:/root/targetfs,nolock rw mem=128M earlyprintk rootdelay=10'
TI8168_EVM#setenv ipaddr 192.168.1.100
TI8168_EVM#setenv nfsserver 192.168.1.108
TI8168_EVM#setenv gatewayip 192.168.1.1
TI8168_EVM#setenv netmask 255.255.255.0
TI8168_EVM#setenv hostname zb205-desktop
TI8168_EVM#setenv addip 'setenv bootargs ${bootargs} ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}:${hostname}:eth0:off'
TI8168_EVM#setenv bootcmd 'run addip;tftp 0x81000000 /tftpboot/uImage.bin;bootm'
TI8168_EVM#setenv serverip 192.168.1.108
TI8168_EVM#save
Saving Environment to NAND...
Erasing Nand...
Warning: Erase size 0x00002000 smaller than one erase block 0x00020000
Erasing 0x00020000 instead

Could I do like these? would anyone help me out ?

thanks!

best regard! 

 

  • Hi,

    Have you checked the state of the Write Protect pin when you try to write? And what is board, customs or not. Please see and the post:
    e2e.ti.com/.../601212

    BR
    Ivan
  • Bean,

    bean lee said:
    Warning: Erase size 0x00002000 smaller than one erase block 0x00020000
    Erasing 0x00020000 instead

    Usually this warning can be ignored:

    You can check what the final result is, with #print command, to verify that this is really saved in NAND.

    Regards,
    Pavel

  • Hi,
    Thank you for your kindly reminding,
    but it stuck here, and didn't go forward,
    also,I've checked env by #print command, and that's really not saved in nand!

    Best regard!

  • Thank you!
    I've checked that it's not in the Write Protection state.
    best regard!
  • Bean,

    bean lee said:
    Thank you for your kindly reminding,
    but it stuck here, and didn't go forward,
    also,I've checked env by #print command, and that's really not saved in nand!

    Are you using DM816x TI EVM or custom board? Are you using DM816x EZSDK 5.05.02.00?

    Could you please provide me full console log of the boot up process, not just part of it. Are you sure you are booting from NAND?

    Best regards,
    Pavel

  • Hi:

    I'm using  DM816x TI EVM ,and DM816x EZSDK 5.05.02.00 which was downloaded from TI company'website.

    here are my full console logs of the boot up process:

    TI8168-GP rev 2.1

    ARM clk: 987MHz
    DDR clk: 796MHz

    I2C:   ready
    DRAM:  2 GiB
    NAND:  HW ECC BCH8 Selected
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
    NAND bus width 8 instead 16 bit
    No NAND device found!!!
    0 MiB
    MMC:   OMAP SD/MMC: 0
    *** Warning - bad CRC or NAND, using default environment

    :,;;:;:;;;;;;;;r;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:;;;;;;;;:,;;:;:
    ;,;:::;;;;r;;;rssiSiS552X5252525259GX2X9hX9X9XX2325S55252i5:,;;:;:;;;;;;;;:,;;:
    ;:;;;;;;;rrssSsS52S22h52299GGAAMHMM#BBH#B#HMM#HMBA&&XX2255S2S5Si:,;;:;:;;;;;;;;
    ;:;;r;;rsrrriiXS5S329&A&MH#BMB#A&9XXA252GXiSXX39AAMMMBB&G22S5i2SSiiiisi:,;;:;:;
    ;;;;;r;rr2iisiih393HB#B#AA99i22irrrX3X52AGsisss2Xii2299HBMA&X2S5S5iSiisSsi:,;;:
    r:r;rrsrsihXSi2&##MHB&Ahh3AGHGA9G9h&#H##@@@##MAMMXXX9SSS29&&HGGX2i5iisiiisisi:,
    ;;rrrrsSiiiA&ABH&A9GAGhAhBAMHA9HM@@@@@@@@@@@@@@@@@@@HHhAh2S2SX9&Gh22SSiisiiisii
    r:rrssisiS2XM##&h3AGAX&3GG3Ssr5H@M#HM2; ;2X&&&MHMB###GBB#B&XXSSs529XX55iSsisisi
    r;rsrisSi2XHAhX99A3XXG&&XS;:,rH#HGhAS   @@@@3rs2XBM@@A552&&AHA2XiisSS252SSsisSs
    r;issi5S22&&3iSSX292&hXsr;;:;h@&G339&S9@@@@2@MA&9&HB##Xris29ABMAAX2ir;rsSi5iss5
    rrsSi2XhG&9GXh399&X99i;;;;;;r#H&293H9X#@@@@@@@B&9GhAH@XrrsrsiXABHB&HG2rr;rrSiSi
    ;:rsisS599&AA9XG&3A35r;:::;,;BMh&&2iX5A@@@@@@@&392X5GB2;;;r;iSX393A##A&Xi:::rsi
    ;:rss552222X553&XHMhir;;::,:,h#HhGSXhG3#@@@@#AXXS2XAHA;::;;;;ss55XShBA3239r:,;;
    r;ii2S5SSi2i53hirsh2srr::,,,,;MMXX359&Ah3h&Si59SX99A#i:,::::;;sri2,.2r;:SGAr;,:
    ;:;rrrrssiriXGSi::shs;;;,,,:,,rBBA9h5s5h5iS5isi2SAHB5:,,,:::;rrs5&SrisSX5Srrr:,
    ;,r;;;;rsriSSrrrr;;5Xrr;;,:,,.,;9AA2SsisS5323XXXG9&i:.,,::;;r;;;srrrrrr;;:;::::
    :,;r;r;rrissrrr;:;::;s;;;;,:,,..,r293h222hXXAAGGGX;:,,,:,:,::;:;::,:,,,,...,,,,
    ;,;;;;rrrrrrrrirr;,.,,:::::::,,,,.,;SX&ABAB2hhXir:,,.,,.,,:,,,,..,,,..,..,,,..:
    :.:;:;;;:;;;;r;rrs;:.. ,,:::::,:,:,,.::rrsrr;;,,.......,..,....,,,,,,,...,.,,:,
    :.:::,::::::;;r;rrr;:.......,.,.,,:::,,...............,,::.,,,,:,::,,:,:,,,:,;:
    ,.::,:,,,,,;;;;;;;;r;;::,..............................;;;:;::::,:::::::,:,:,,,
    : ,,:,,,,,,,,,,,,,:;rrr;;:;,,,,,,,::,.,.:.,.,;s,:;;;;:;:;;;;;::::,:::,:::,:,:,:
    ,.,,,,,,,...,,.,,....................................:,............:,,,:,:,,,,,

    Net:   <ethaddr> not set. Reading from E-fuse
    Detected MACID:0:18:31:e6:e0:a4
    Ethernet PHY: GENERIC @ 0x01
    DaVinci EMAC
    Hit any key to stop autoboot:  0
    Card did not respond to voltage select!
    ** Can't read from device 0 **

    ** Unable to use mmc 0:1 for fatload **
    In case ENV on MMC/SD is required
    Please put a valid script named boot.scr on the card
    Refer to the User Guide on how to generate the image
    TI8168_EVM#print
    bootcmd=if mmc rescan 0; then if run loadbootscript; then run bootscript; else echo In case ENV on MMC/SD is required; echo Please put a valid script named boot.scr on the card; echo Refer to the User Guide on how to generate the image; fi; else echo Please set bootargs and bootcmd before booting the kernel; echo If that has already been done please ignore this message; fi
    bootdelay=3
    baudrate=115200
    autoload=no
    verify=yes
    bootfile=uImage
    ramdisk_file=ramdisk.gz
    loadaddr=0x81000000
    script_addr=0x80900000
    loadbootscript=fatload mmc 0 ${script_addr} boot.scr
    bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}
    ethaddr=00:18:31:e6:e0:a4
    ethact=DaVinci EMAC
    ver=U-Boot 2010.06 (Dec 24 2012 - 20:11:30)

    Environment size: 742/8188 bytes
    TI8168_EVM#setenv ipaddr 192.168.1.100
    TI8168_EVM#saveenv
    Saving Environment to NAND...
    Erasing Nand...
    Warning: Erase size 0x00002000 smaller than one erase block 0x00020000
             Erasing 0x00020000 instead

    It stuck here,and can't move forword.

    So,Why couldn't I save envs into my nand flash? 

    ------------------------------

    I have Flashed  u-boot image (u-boot.noxip.bin) to NAND execute the commands listed below:

    TI8168_EVM# mw.b 0x81000000 0xFF 0x260000
    TI8168_EVM# tftp 0x81000000 u-boot.noxip.bin
    TI8168_EVM# nand erase 0x0 0x260000     <=== Erasing the whole partition before flashing the image
    TI8168_EVM# nandecc hw 2
    TI8168_EVM# nand write.i 0x81000000 0x0 0x260000
    TI8168_EVM# nandecc hw 0

    and NAND boot mode are setted as below:

    SW3---->BTM[4:0] ==> 10010   (other pins should be 0 i.e. OFF)
    SW4---->NAND ON
    Daughter Card SW1---->SW1[3:0] ==> 0000 (all off)

    ----------------------------------

    Would you please help find the reason?

    Best regards!

  • Bean,

    bean lee said:
    NAND bus width 8 instead 16 bit
    No NAND device found!!!
    0 MiB

    Can you check if you have configured the NAND chip for 16-bit mode? You need to configure SW3 - 8 - CS0BW to 1.

    The release supports both 8 and 16 bit NAND flash. The settings to select the NAND buswidth, using the CS0BW switch, have changed from the previous release. To use 8-bit NAND, set the CS0BW (buswidth) switch on the EVM to OFF state. To use 16-bit NAND, set the CS0BW (buswidth) switch on the EVM to ON state.

    Regards,
    Pavel

  • Hi:I configure SW3 - 8 - CS0BW to 1. and now it starts working! Thank you !
    Best regard!