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.

TDA4VM: eMMC read is not working

Part Number: TDA4VM

Dear TI Team,

I am trying to boot the J21E-EVM board with eMMC but the eMMC is not working.

Steps that were done are as follows. [Assuming the EVM is at the U-BOOT prompt]

1. setenv serverip 10.0.0.1

2.setenv ipaddr 10.0.0.2

3.setenv gatewayip 10.0.0.1

4.setenv netmask 255.255.255.0

5.Once the server is alive issue tftp 0x80080000 ifs-j721e-evm.raw

6.mmc write 0x80080000 0x0 0x7af288 ----> This is getting failed.as we are giving the whole ifs-j721e-evm.raw's size

7. Since 6 th step is failing, we have splitted the image into 1k blocks and wrote into eMMC. then it started writing to eMMC as follows.

mmc write 0x80080000 0x0 0xf4240

and so on till 

mmc write 0x80080000 0x895440 0xf4240

8. mmc read 0x80080000 0x0 0x7af288

MMC read: dev # 0, block # 0, count 8057480 ... "Synchro

The EVM is getting struck here. So kindly give us your thoughts on this for the following questions

1. Why eMMC write is failing in 6th step, Is it due to size issue? if size is the issue, then what could be the sizes that are allowed or minimum/maximum sizes.

2. After writing 1k blocks the eMMC write is successful but why the eMMC read is not successful. (8 th step)?

Thank you,

Regards,

Krishna

 

  • Hi Krishna,

    Why you are using tftp to flash the emmc any specific reason otheriwse you can use DFU/sdcard ?

    Regards
    Diwakar

  • emmc_autotftp.txt

    Hi Diwakar,

    We connected the TI J21E  EVM hardware to ubuntu machine and we are using it remotely.So thats the reason we are using TFTP.

    step 1. Changed the boot switches to emmc .

    step  2. emmc is having boot partition (uboot etc) and rootfs partition (lib/firmware/ifs.raw)

    step 3 .Now when I switch on the evm I am getting the following error.

    MMC: no card present
    mmc_init: -123, time 2002
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!

    Even after doing the following step I am getting the same error.

    setenv mmcdev 0 (emmc)

    Attached the printenv information also.

    Finally I have 2 questions

    1. May I know the reason, why the emmc boot is not working.

    2.when we do saveenv , getting the failed message as shown in the attached "emmc_boot_Issue.png". May I know the reason for this ?

    printenv
    addr_fit=0x90000000
    arch=arm
    args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    args_ufs=setenv devtype scsi;setenv bootpart 1:1;run ufs_finduuid;setenv bootargs console = ${console} ${optargs}root=PARTUUID=${uuid}1
    baudrate=115200
    board=j721e
    board_name=J721EX-PM2-SOM
    board_rev=unknown
    board_serial=unknown
    board_software_revision=unknown
    boot=mmc
    boot_fdt=try
    boot_fit=0
    boot_rprocs=if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then rproc init;run boot_rprocs_mmc;fi;
    boot_rprocs_mmc=env set rproc_id;env set rproc_fw;env set secure_suffix;if test ${boot_fit} -eq 1; then env set secure_suffix -sec;fi;e
    bootcmd=run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_kern_${boot}; run get_fdt_n
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootm_size=0x10000000
    bootpart=1:2
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyS2,115200n8
    cpu=armv8
    default_device_tree=k3-j721e-common-proc-board.dtb
    dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;tispl.bin.raw raw1
    dfu_alt_info_mmc=boot part 1 1;rootfs part 1 2;tiboot3.bin fat 1 1;tispl.bin fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1;sysfw.itb fat1
    dfu_alt_info_ospi=tiboot3.bin raw 0x0 0x080000;tispl.bin raw 0x080000 0x200000;u-boot.img raw 0x280000 0x400000;u-boot-env raw 0x680000
    dfu_alt_info_ram=tispl.bin ram 0x80080000 0x200000;u-boot.img ram 0x81000000 0x400000
    dorprocboot=0
    dtboaddr=0x89000000
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else i;
    ethaddr=34:08:e1:5b:69:43
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=fdeaf730
    fdtoverlay_addr_r=0x80200000
    findfdt=setenv name_fdt ${default_device_tree};if test $board_name = J721EX-PM1-SOM; then setenv name_fdt k3-j721e-proc-board-tps65917}
    finduuid=part uuid ${boot} ${bootpart} uuid
    get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
    get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit}
    get_kern_mmc=load mmc ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
    get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
    get_overlay_mmc=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load mmc ${bootpart} ${dtboaddr} ${bootdir;
    get_overlay_ufs=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load scsi ${bootpart} ${dtboaddr} ${bootdi;
    get_overlaystring=for overlay in $name_overlays;do;setenv overlaystring ${overlaystring}'#'${overlay};done;
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17;gpio clear gpio@22_16
    init_mmc=run args_all args_mmc
    init_ufs=ufs init; scsi scan; run args_ufs
    kernel_addr_r=0x82000000
    loadaddr=0x82000000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    main_cpsw0_qsgmii_phyinit=if test $board_name = J721EX-PM1-SOM || test $board_name = J721EX-PM2-SOM || test $board_name = j721e; then ;
    mmcboot=mmc dev ${mmcdev}; devnum=${mmcdev}; devtype=mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; ;
    mmcdev=1
    mmcloados=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ;
    mmcrootfstype=ext4 rootwait
    mtdids=nor0=47040000.spi.0,nor0=47034000.hyperbus
    mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),1m(ospi.sysfw),256k(ospi.env.backup))
    name_fit=fitImage
    name_kern=Image
    partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
    pxefile_addr_r=0x80100000
    ramdisk_addr_r=0x88080000
    rd_spec=-
    rdaddr=0x88080000
    rproc_fw_binaries=2 /lib/firmware/j7-main-r5f0_0-fw 3 /lib/firmware/j7-main-r5f0_1-fw 4 /lib/firmware/j7-main-r5f1_0-fw 5 /lib/firmwar
    rproc_load_and_boot_one=if load mmc ${bootpart} $loadaddr ${rproc_fw}; then if rproc load ${rproc_id} ${loadaddr} ${filesize}; then rpi
    run_fit=bootm ${addr_fit}#${fdtfile}${overlaystring}
    run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
    scriptaddr=0x80000000
    scsirootfstype=ext4 rootwait
    serial#=0000000000000000
    soc=k3
    stderr=serial@2800000
    stdin=serial@2800000
    stdout=serial@2800000
    ufs_finduuid=part uuid scsi ${bootpart} uuid
    update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}
    vendor=ti
    
    Environment size: 6543/131068 bytes
    

    Thank you,

    Regards,

    Krishna

  • HI Krishna

    Which sdk version you are using so that i can make a similar setup at my end?

    Regards
    Diwakar

  • HI Krishna

    Which sdk version you are using so that i can make a similar setup at my end?

    Also suggested to use DFU to flash to the emmc boot 0 partition you can see section 5.1.3.1 Flashing Instructions of 

    https://www.ti.com/lit/an/spracy5/spracy5.pdf?ts=1683613946242&ref_url=https%253A%252F%252Fwww.google.com%252F

    Regards
    Diwakar

  • Hi Diwakar,

    I think, I have solved the problem.

    Thank you,

    Regards,

    Krishna

  • Hi Krishna,

    Glad to hear that you have solved it what are the changes you did for this ?

    Regards
    Diwakar