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: with DFU , USB device download firmware failed

Part Number: TDA4VM

I am using a custom board with TDA4VM.  I followed the steps from http://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/latest/exports/docs/linux/Foundational_Components/U-Boot/UG-DFU.html

tiboot3.bin and sysfw.itb are offical released (V7_02 )bins , tispi.bin and u-boot.img are rebuild . 

with dfu-util . I can download the tiboot3.bin . but can not download the sysfw.itb , how Can I continue the  boot steps?

 

download firmwares failed ,Traces below:

#sudo dfu-util -l

Found DFU: [0451:6163] ver=0200, devnum=2, cfg=1, intf=0, path="3-2", alt=1, name="SocId", serial="01.00.00.00"
Found DFU: [0451:6163] ver=0200, devnum=2, cfg=1, intf=0, path="3-2", alt=0, name="bootloader", serial="01.00.00.00"

#sudo dfu-util -R -a bootloader -D tiboot3.bin

#sudo dfu-util -l
Found DFU: [0451:6163] ver=0224, devnum=8, cfg=1, intf=0, path="3-2", alt=0, name="sysfw.itb", serial="UNKNOWN"

#sudo dfu-util -R -a sysfw.itb -D sysfw.itb
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download [ ] 0% 0 bytes failed!
state(10) = dfuERROR, status(14) = Something went wrong, but the device does not know what it was
dfu-util: can't detach
Resetting USB to switch back to runtime mode

  • Hi,

    DFU boot is not functional on 7.2 SDK. Could you try the below patch on u-boot directory and confirm if you issue is fixed:

    dfu-patch.txt
    From patchwork Tue Feb  9 12:45:33 2021
    Content-Type: text/plain; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Subject: [tiU20.01,
     1/2] configs: j721e_evm: Add configs to support DFU boot mode
    Date: Tue, 09 Feb 2021 18:45:33 -0000
    From: Aswath Govindraju <a-govindraju@ti.com>
    X-Patchwork-Id: 59279
    Message-Id: <20210209124534.17539-2-a-govindraju@ti.com>
    Cc: <linux-patch-review@list.ti.com>, Praneeth Bajjuri <praneeth@ti.com>,
     Lokesh Vutla <lokeshvutla@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
     Kishon Vijay Abraham I <kishon@ti.com>, Pratyush Yadav <p.yadav@ti.com>,
     Aswath Govindraju <a-govindraju@ti.com>
    
    On J721e R5 SPL, dfu buffer for loading sysfw.itb image gets allocated
    before DRAM gets initialized. So, the buffer gets allocated in MCU L3 RAM.
    The current buffer size to be allocated is 256KB  and the available total
    heap memory is 0x70000 (448KB). This leads to NOMEM errors during
    allocation.
    
    Also, if CONFIG_SYS_DFU_DATA_BUF_SIZE is defined and
    CONFIG_SYS_DFU_MAX_FILE_SIZE is not defined then in include/dfu.h, the max
    file size for dfu transfer is defined as CONFIG_SYS_DFU_DATA_BUF_SIZE.
    
    Fix these by reducing the dfu buffer size to be allocated in R5 SPL and
    defining the max file size as 8 MB which is the default dfu buffer size.
    
    Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
    Acked-by: Pratyush Yadav <p.yadav@ti.com>
    
    ---
    include/configs/j721e_evm.h | 21 +++++++++++++++++++--
     1 file changed, 19 insertions(+), 2 deletions(-)
    
    diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
    index 8a9551316846..620728a18b95 100644
    --- a/include/configs/j721e_evm.h
    +++ b/include/configs/j721e_evm.h
    @@ -51,6 +51,25 @@
     /* Image load address in RAM for DFU boot*/
     #endif
     
    +#if defined(CONFIG_TARGET_J721E_R5_EVM)
    +/*
    + * The dfu buffer is allocated for downloading sysfw.itb.
    + * This limits the allocation to MCU L3 RAM as DRAM is initialized later.
    + * The total heap memory available is 0x70000 bytes. So, reduce
    + * the buffer size to avoid NOMEM error.
    + */
    +#define CONFIG_SYS_DFU_DATA_BUF_SIZE    0x5000
    +#else
    +/* Set default dfu buffer size to 256KB (sector size of OSPI) */
    +#define CONFIG_SYS_DFU_DATA_BUF_SIZE    0x40000
    +#endif
    +
    +/*
    + * If the maximum size is not declared then it is defined as
    + * CONFIG_SYS_DFU_DATA_BUF_SIZE.
    + */
    +#define CONFIG_SYS_DFU_MAX_FILE_SIZE   (1024 * 1024 * 8)   /* 8 MiB */
    +
     #ifdef CONFIG_SYS_K3_SPL_ATF
     #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"tispl.bin"
     #endif
    @@ -156,9 +175,7 @@
     #define EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY
     #endif
     
    -/* set default dfu_bufsiz to 128KB (sector size of OSPI) */
     #define EXTRA_ENV_DFUARGS \
    -	"dfu_bufsiz=0x40000\0" \
     	DFU_ALT_INFO_MMC \
     	DFU_ALT_INFO_EMMC \
     	DFU_ALT_INFO_RAM \
    


    Best Regards,
    Keerthy

  • hi Keerthy :

     thanks for your reply , with your path , I boot spl from USB device  ok !

  • Hi,

    Great! Please resolve the issue.

    - Keerthy