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: SBL boot from OSPI failed

Part Number: TDA4VM
Other Parts Discussed in Thread: UNIFLASH

Hi Ti support team,

I use the J721eEVM board and  ti-processor-sdk-rtos-j721e-evm-07_03_00_07 SDK.

Boot mode setting: 

SW3[1-8] = 0xxx xxxx
SW8[1-8] = 0000 0000
SW9[1-8] = 0100 0000

1. use the SDK default address

The SBL flash to OSPI is successful, but there is no any print on the mcu uart console after change the boot mode to OSPI.

And I found that the generated sbl_cust_img_mcu1_0_release.tiimage size is greater than 256k.  But the OSPI_LOCATION_SYSFW_BIN start address is 0x40000.

I think part of sbl_cust_img_mcu1_0_release.tiimage will be overwiter by tifs.bin. Is it the problem?

total 24452
-rw-r--r-- 1 kezhh users  247036 Aug  2 12:50 app
-rw-r--r-- 1 kezhh users  423044 Aug  2 12:59 atf_optee.appimage
drwxr-xr-x 2 kezhh users    4096 Jul 30 09:29 atf_optee_dir
-rw-r--r-- 1 kezhh users  239932 Aug  2 12:52 can_boot_app_mcu_rtos_mcu1_0_release_ospi.appimage
-rw-r--r-- 1 kezhh users 8951852 Aug  2 12:59 ifs_qnx.appimage
-rw-r--r-- 1 kezhh users 7212036 Aug  2 12:59 lateapp1
-rw-r--r-- 1 kezhh users 7118980 Aug  2 12:59 lateapp2
drwxr-xr-x 2 kezhh users    4096 Aug  2 12:59 rprcs
-rw-r--r-- 1 kezhh users  264727 Aug  2 12:50 sbl_cust_img_mcu1_0_release.tiimage
-rw-r--r-- 1 kezhh users  289623 Aug  2 12:48 tiboot3.bin
-rwxr-xr-x 1 kezhh users  263072 Aug  2 12:48 tifs.bin

2. change the OSPI_LOCATION_SYSFW_BIN start address to  0x50000.

The SBL flash to OSPI is successful, but there is no any print on the mcu uart console after change the boot mode to OSPI.

3. Use sd card boot mode

sbl boot is successful.

 

  • Hi,

    TI is not aware of any OSPI boot issues with the PSDK QNX 7.3 release.   

    Will attempt to reproduce the issue and will provide feedback.

    Have any S/W changes been made, or is the default PSDK under test?

    Regards,

    kb

  • Hi kb,

    Case 1 and Case 2 have no any change. use the default PSDK.

    Case 2 change the  OSPI_LOCATION_SYSFW_BIN start address to  0x50000.

    BR

    Yun

  • Hi Kb,

    Did you reproduce it? And I use the uniflash_6.3.0.  Can I use this version? Does the EVM board need any other settings? 

  • Hi Yun,

    I too am having issues with the PSDK QNX 7.3  SBL OSPI boot, where SBL SD boot is working fine.   

    Will continue to investigate and let you know of any findings that are not specific to my build environment.

    Regards,

    kb

  • Hi Yun,

    Can you please try the below modification and share results?

    Modify file, ti-processor-sdk-rtos-j721e-evm-07_03_00_07/vision_apps/makerules/makefile_sbl.mak to use the following addresses:

    With these settings, the SBL OSPI boot for QNX was functional in local SDK 7.3 testing.

    Regards,

    kb

  • Hi kb,

  • Hi kb,

  • Hi kb,

      After that change from you, the MCU uart will show log "Invalid magic number in Single image header". Anything do I also need to change in the source code?

    BR

    Yun

  • Hi Yun,

    No source code changes should be necessary.   Will double check my environment tomorrow, and re-test.

    Regards,

    kb

  • Hi Yun,

    I retested SDK7.3 SDK  with the below changes applied and did not see any issues.   

    Changes can be applied to ti-processor-sdk-rtos-j721e-evm-07_03_00_07/vision_apps/makerules/makefile_sbl.mak, same as above.

    Please note there is an additional update in below patch to include the programming of the OSPI test pattern.  

    makefile_sbl.mak.diff.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    diff --git a/ti-processor-sdk-rtos-j721e-evm-07_03_00_07/vision_apps/makerules/makefile_sbl.mak b/../ti-processor-sdk-rtos-j721e-evm-07_03_00_07/vision_apps/makerules/makefile_sbl.mak
    index a0858d9..1e613a7 100644
    --- a/ti-processor-sdk-rtos-j721e-evm-07_03_00_07/vision_apps/makerules/makefile_sbl.mak
    +++ b/../ti-processor-sdk-rtos-j721e-evm-07_03_00_07/vision_apps/makerules/makefile_sbl.mak
    @@ -6,19 +6,21 @@
    #OSPI DATA
    OSPI_LOCATION_SBL_IMAGE=0
    -OSPI_LOCATION_SYSFW_BIN=40000
    -OSPI_LOCATION_BOOT_APP=A0000
    -OSPI_LOCATION_MULTI_CORE_IMAGE_1=1800000
    -OSPI_LOCATION_MULTI_CORE_IMAGE_2=2400000
    -OSPI_LOCATION_ATF_IMAGE=E0000
    -OSPI_LOCATION_LINUX_DTB=16C0000
    -OSPI_LOCATION_HLOS_KERNEL_IMAGE=6C0000
    +OSPI_LOCATION_SYSFW_BIN=80000
    +OSPI_LOCATION_BOOT_APP=100000
    +OSPI_LOCATION_MULTI_CORE_IMAGE_1=1FC0000
    +OSPI_LOCATION_MULTI_CORE_IMAGE_2=27C0000
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    kb

  • Hi KB,

    I add the OSPI test pattern, but the result still same. It still show "Invalid magic number in Single image header" on MCU uart console.

    BR

    Yun

  • Hi KB,

    I retest it again. After update the test pattern patch, the SBL boot form OSPI is successful. Why I must flash the OSPI test pattern image?

    BR

    Yun

  • Hi Yun

    The OSPI test pattern is used as part of the OSPI tuning.  The S/W algorithm follows recommendations at OSPI Tuning Procedure  https://www.ti.com/lit/pdf/spract2.  

    The source code for this can be referenced at https://bitbucket.itg.ti.com/projects/PROCESSOR-SDK/repos/pdk/browse/packages/ti/board/src/flash/nor/ospi/nor_spi_phy_tune.c.

    This code references the pattern from https://bitbucket.itg.ti.com/projects/PROCESSOR-SDK/repos/pdk/browse/packages/ti/board/src/flash/nor/ospi/nor_spi_patterns.c.

    Regards,

    kb