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.

[FAQ] TDA4VH: OSPI FLASHING USING DFU cum DFU Issues

Part Number: TDA4VH

Tool/software:

How to flash to OSPI using DFU?

  • SDK 9.2 Issues:

    • The tiboot3.bin has a size > 512 KB which causes issues.
      • Hence the workaround would be to remove CONFIG_SPL_FS_LOADER option from r5 defconfig and rebuild tiboot3.bin.

    SDK 8.0 Issues:

    J722S HS-FS Issue solution:

    J721E SK Issues:

    The steps to flash to OSPI using DFU  are:

    • Connect Host PC to the MAIN UART of the board and connect minicom to the first instance.
    • Connect the USB Type C cable to the Host PC (Linux)
    • Set the board to DFU boot mode.As an example,the setting for J721E board is attached below.SImilarly set for the board which you are using.
      • SW8[1:8]:1000_0000
        SW9[1:8]:0010_0000
        SW3[1:10]:0101_0010_10
    • Power on the board
    •  HOST SIDE:Execute the following commands
      • >sudo dfu-util -l
        >sudo dfu-util -R -a bootloader -D <Path to tiboot3.bin binary>
        >sudo dfu-util -R -a tispl.bin -D  <Path to tispl.bin binary>
        >sudo dfu-util -R -a u-boot.img -D <Path to u-boot.img binary>
    • After executing the above commands on the host(PC),you will be able to see u-boot coming up on the board through minicom.
    • As soon as u-boot comes up , click enter so that you can enter into u-boot .
    • Now you can flash SBL bootfiles/SPL bootfiles to OSPI based on your choice by following the steps below:

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

    Flashing SBL bootfiles to OSPI :

     

    • TARGET SIDE(BOARD):Execute the below commands:
      •  
        setenv dfu_alt_info_ospi 'tiboot3.bin raw 0x0 <size in hex>;tifs.bin raw 0x80000 <size in hex>;app raw 0x100000 <size in hex>;nor_spi raw 0x3fc0000 0x8'
    • TARGET SIDE[BOARD]:Execute the below commands at u-boot.
      • NOTE:Ensure that the sf probe command shows NOR flash(Not NAND flash) 
      • >setenv dfu_alt_info ${dfu_alt_info_ospi}
        >sf probe
        >sf erase 0 0x400000
        >dfu 0 sf 0:0
    • HOST SIDE:Execute the following commands
      • >sudo dfu-util -l
        >sudo dfu-util -a tiboot3.bin -D <Path to sbl_xx.tiimage file>
        >sudo dfu-util -a tifs.bin -D <Path to tifs.bin> 
        >sudo dfu-util -a app -D <path to app image>
        >sudo dfu-util -a nor_spi -D <Path to nor_spi_patterns.bin>
    • Boot using OSPI boot mode

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

    Flashing SPL bootfiles to OSPI :

    • TARGET SIDE[BOARD]:Execute the below commands at u-boot.
      • NOTE:Ensure that the sf probe command shows NOR flash(Not NAND flash)   
      • >setenv dfu_alt_info ${dfu_alt_info_ospi}
        >sf probe
        >sf erase 0 0x400000
        >dfu 0 sf 0:0
    • HOST SIDE:Execute the following commands
      • >sudo dfu-util -l
        >sudo dfu-util -a tiboot3.bin -D <Path to tiboot3.bin>
        >sudo dfu-util -a sysfw.itb -D <Path to sysfw.itb>    [Only needed for J721E board]
        >sudo dfu-util -a tispl.bin -D <Path to tispl.bin image>
        >sudo dfu-util -a u-boot.img -D <Path to u-boot.img>
    • Boot using OSPI boot mode

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