problem for downloading dtb to self-designed xavier main board

Hi
When i download the dtb to our main board,the host can recognize the APX USB infomation in recovery mode.but after exacuting command that for downloading dtb “sudo ./flash.sh -r -k kernel-dtb jetson-xavier mmcblk0p1”, it halted and the error infomation is"USB communication failed.Check if device is in recovery".The log show below.Can help fix it?
BTW,when the xavier is on the running ,all usb ports work ok.

hll@ubuntu:~/jetpack/Xavier/Linux_for_Tegra$ sudo ./flash.sh -r -k kernel-dtb jetson-xavier mmcblk0p1
###############################################################################
# L4T BSP Information:
# R31 (release), REVISION: 1.0, GCID: 13194883, BOARD: t186ref, EABI: aarch64, 
# DATE: Wed Oct 31 22:26:16 UTC 2018
###############################################################################
# Target Board Information:
# Name: jetson-xavier, Board Family: t186ref, SoC: Tegra 194, 
# OpMode: production, Boot Authentication: , 
###############################################################################
copying soft_fuses(/home/hll/jetpack/Xavier/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg)... done.
./tegraflash.py --chip 0x19 --applet "/home/hll/jetpack/Xavier/Linux_for_Tegra/bootloader/mb1_t194_prod.bin" --skipuid --soft_fuses tegra194-mb1-soft-fuses-l4t.cfg --bins "mb2_applet nvtboot_applet_t194.bin" --cmd "dump eeprom boardinfo cvm.bin;reboot recovery" 
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.1423 ] Generating RCM messages
[   0.1908 ] tegrahost_v2 --chip 0x19 0 --magicid MB1B --appendsigheader /home/hll/jetpack/Xavier/Linux_for_Tegra/bootloader/mb1_t194_prod.bin zerosbk
[   0.1927 ] Header already present for /home/hll/jetpack/Xavier/Linux_for_Tegra/bootloader/mb1_t194_prod.bin
[   0.2616 ] 
[   0.2819 ] tegrasign_v2 --key None --getmode mode.txt
[   0.2830 ] Assuming zero filled SBK key
[   0.3017 ] 
[   0.3210 ] tegrabct_v2 --chip 0x19 0 --sfuse tegra194-mb1-soft-fuses-l4t.cfg.pdf sfuse.bin
[   0.3381 ] 
[   0.3390 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x19 0 --sfuses sfuse.bin --download rcm /home/hll/jetpack/Xavier/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin 0 0
[   0.3399 ] RCM 0 is saved as rcm_0.rcm
[   0.3432 ] RCM 1 is saved as rcm_1.rcm
[   0.3443 ] RCM 2 is saved as rcm_2.rcm
[   0.3468 ] List of rcm files are saved in rcm_list.xml
[   0.3581 ] 
[   0.3582 ] Signing RCM messages
[   0.3590 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key --getmontgomeryvalues montgomery.bin
[   0.3612 ] Assuming zero filled SBK key
[   0.3673 ] 
[   0.3675 ] Copying signature to RCM mesages
[   0.3707 ] tegrarcm_v2 --chip 0x19 0 --updatesig rcm_list_signed.xml
[   0.3781 ] 
[   0.3781 ] Boot Rom communication
[   0.3789 ] tegrarcm_v2 --chip 0x19 0 --rcm rcm_list_signed.xml --skipuid
[   0.3797 ] RCM version 0X190001
[   0.3820 ] Boot Rom communication completed
[   1.4339 ] 
[   2.4367 ] tegrarcm_v2 --isapplet
[   2.4375 ] Applet version 01.00.0000
[   2.5019 ] 
[   2.5027 ] tegrarcm_v2 --ismb2
[   2.5734 ] 
[   2.5748 ] tegrahost_v2 --chip 0x19 --align nvtboot_applet_t194.bin
[   2.5813 ] 
[   2.5819 ] tegrahost_v2 --chip 0x19 0 --magicid PLDT --appendsigheader nvtboot_applet_t194.bin zerosbk
[   2.5826 ] adding BCH for nvtboot_applet_t194.bin
[   2.6940 ] 
[   2.6950 ] tegrasign_v2 --key None --list nvtboot_applet_t194_sigheader.bin_list.xml
[   2.6958 ] Assuming zero filled SBK key
[   2.7007 ] 
[   2.7245 ] tegrahost_v2 --chip 0x19 0 --updatesigheader nvtboot_applet_t194_sigheader.bin.encrypt nvtboot_applet_t194_sigheader.bin.hash zerosbk
[   2.7340 ] 
[   2.7349 ] tegrarcm_v2 --download mb2 nvtboot_applet_t194_sigheader.bin.encrypt
[   2.7357 ] Applet version 01.00.0000
[   2.7998 ] Sending mb2
[   2.8000 ] [................................................] 100%
[   2.8855 ] 
[   2.8864 ] tegrarcm_v2 --boot recovery
[   2.8872 ] Applet version 01.00.0000
[   2.9879 ] 
[   3.9912 ] tegrarcm_v2 --isapplet
[   3.9923 ] USB communication failed.Check if device is in recovery

It halted on the same place everytime and the same Cross-compilation environment can download dtb to official board.

Hi, did you see recovery usb device before download?

Hi Trumany
yes,the APX Nvidia recovery USB can always been seen,before download or downloading error Occurred.I tried connect the debug serial port to log,i found some error information,but i don’t know why and how the error occurred.The log shows below.

[0041.467] I> MB1 (prd-version: 1.0.0.0-t194-41334769-a3872862)
[0041.473] I> Boot-mode: Platform RCM
[0041.476] I> chip revision : A02 
[0041.479] I> Bootrom patch version : 7 (correctly patched)
[0041.484] I> ATE fuse revision : 0x200
[0041.488] I> Ram repair fuse : 0x0
[0041.491] I> Ram Code : 0x0
[0041.493] I> rst_source : 0x0
[0041.496] I> rst_level : 0x0
[0041.500] I> USB configuration success
[0043.481] I> Command received is 1
[0043.556] I> Command received is 1
[0043.683] I> Command received is 1
[0043.750] I> Command received is 2
[0043.790] I> mb2 image downloaded
[0043.834] I> Command received is 1
[0043.906] I> Command received is 10
[0043.909] I> Recovery boot mode 0
[0043.922] E> Unsupported boot-device strap-reg: 0x00000004
[0043.927] E> Get boot dev failed
[0043.930] E> UPHY lane_config get failed
[0043.933] E> task 33 failed (err: 0x1e1e0001)
[0043.937] E> top caller module: SOCMISC, error module: SOCMISC, reason: 0x01, aux_info: 0x00
[0043.945] I> MB1(1.0.0.0-t194-41334769-a3872862) BIT boot status dump :
1111111111111100000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
[0043.975] I> Reset to recovery mode

Are you using custom board? As there is error info “Unsupported boot-device strap-reg: 0x00000004” which might suggest the boot device issue (eMMC is not chose as boot device?), you should check the strapping pins status on carrier board. Please refer to the strapping pins chapter in OEM DG to find out which pin’s status might be wrong.

The reason was that the boot device issue, eMMC is not chose as boot device. Thanks a lot.