jetson tx2 os flah error Return value 3 (Failed flashing t186ref.)

I used the Linux host computer (ubuntu 18.04).
I flushed on the Jetson tx2 board of Jepack 4.2.1.

system.img built successfully.
Existing tbcfile(/home/lim/NVIDIA/NVIDIA/JetPack_4.2.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/cboot.bin) reused.
copying tbcdtbfile(/home/lim/NVIDIA/NVIDIA/JetPack_4.2.1_Linux_GA_P3310/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb)… done.
copying cfgfile(/home/lim/NVIDIA/NVIDIA/JetPack_4.2.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/t186ref/cfg/flash_l4t_t186.xml) to flash.xml… done.
Existing flasher(/home/lim/NVIDIA/NVIDIA/JetPack_4.2.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/nvtboot_recovery_cpu.bin) reused.
Existing flashapp(/home/lim/NVIDIA/NVIDIA/JetPack_4.2.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/tegraflash.py) reused.
./tegraflash.py --bl nvtboot_recovery_cpu.bin --sdram_config P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --odmdata 0x1090000 --applet mb1_recovery_prod.bin --cmd “flash; reboot” --cfg flash.xml --chip 0x18 --misc_config tegra186-mb1-bct-misc-si-l4t.cfg --pinmux_config tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg --pmic_config tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg --pmc_config tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg --prod_config tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg --scr_config minimal_scr.cfg --scr_cold_boot_config mobile_scr.cfg --br_cmd_config tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg --dev_params emmc.cfg --bins “mb2_bootloader nvtboot_recovery.bin; mts_preboot preboot_d15_prod_cr.bin; mts_bootpack mce_mts_d15_prod_cr.bin; bpmp_fw bpmp.bin; bpmp_fw_dtb tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb; tlk tos-trusty.img; eks eks.img; bootloader_dtb tegra186-quill-p3310-1000-c03-00-base.dtb”
saving flash command in /home/lim/NVIDIA/NVIDIA/JetPack_4.2.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/flashcmd.txt
saving Windows flash command to /home/lim/NVIDIA/NVIDIA/JetPack_4.2.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/flash_win.bat
*** Flashing target device started. ***
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.0390 ] tegrasign_v2 --key None --getmode mode.txt
[ 0.0399 ] Assuming zero filled SBK key
[ 0.0412 ]
[ 0.0412 ] Generating RCM messages
[ 0.0567 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
[ 0.0579 ] RCM 0 is saved as rcm_0.rcm
[ 0.0627 ] RCM 1 is saved as rcm_1.rcm
[ 0.0627 ] List of rcm files are saved in rcm_list.xml
[ 0.0627 ]
[ 0.0627 ] Signing RCM messages
[ 0.0636 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0644 ] Assuming zero filled SBK key
[ 0.0672 ]
[ 0.0672 ] Copying signature to RCM mesages
[ 0.0682 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[ 0.0694 ]
[ 0.0695 ] Parsing partition layout
[ 0.0895 ] tegraparser_v2 --pt flash.xml.tmp
[ 0.0912 ]
[ 0.0912 ] Creating list of images to be signed
[ 0.1081 ] tegrahost_v2 --chip 0x18 0 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[ 0.4237 ]
[ 0.4238 ] Generating signatures
[ 0.4247 ] tegrasign_v2 --key None --list images_list.xml --pubkeyhash pub_key.key
[ 0.4254 ] Assuming zero filled SBK key
[ 0.6798 ]
[ 0.6798 ] Generating br-bct
[ 0.7129 ] Updating dev and MSS params in BR BCT
[ 0.7130 ] tegrabct_v2 --dev_param emmc.cfg --sdram P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --brbct br_bct.cfg --chip 0x18 0
[ 0.7721 ]
[ 0.7721 ] Updating bl info
[ 0.7730 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[ 0.7746 ]
[ 0.7746 ] Updating smd info
[ 0.7755 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 --updatesmdinfo flash.xml.bin
[ 0.7764 ]
[ 0.7764 ] Updating Odmdata
[ 0.7772 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updatefields Odmdata =0x1090000
[ 0.7783 ]
[ 0.7783 ] Get Signed section of bct
[ 0.7790 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --listbct bct_list.xml
[ 0.7800 ]
[ 0.7806 ] tegrasign_v2 --key None --list bct_list.xml --pubkeyhash pub_key.key
[ 0.7812 ] Assuming zero filled SBK key
[ 0.7814 ]
[ 0.7814 ] Updating BCT with signature
[ 0.7823 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updatesig bct_list_signed.xml
[ 0.7834 ]
[ 0.7834 ] Generating coldboot mb1-bct
[ 0.7841 ] tegrabct_v2 --chip 0x18 0 --mb1bct mb1_cold_boot_bct.cfg --sdram P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --misc tegra186-mb1-bct-misc-si-l4t.cfg --scr mobile_scr.cfg --pinmux tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg --pmc tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg --pmic tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg --brcommand tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg --prod tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg
[ 0.7849 ] MB1-BCT version: 0xf
[ 0.7851 ] Copying Sdram info from 2 to 3 set
[ 0.7993 ] Packing sdram param for instance[0]
[ 0.7995 ] Packing sdram param for instance[1]
[ 0.7997 ] Packing sdram param for instance[2]
[ 0.8000 ] Packing sdram param for instance[3]

[ 0.8274 ] Parsing config file :tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg
[ 0.8279 ] Appending platform config data of size :- 3048

[ 0.8281 ] Parsing config file :mobile_scr.cfg
[ 0.8283 ] Appending platform config data of size :- 12240

[ 0.8300 ] Parsing config file :tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg
[ 0.8303 ] Appending platform config data of size :- 24

[ 0.8342 ] Parsing config file :tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg
[ 0.8345 ] Appending platform config data of size :- 648

[ 0.8455 ] Parsing config file :tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg
[ 0.8460 ] Appending platform config data of size :- 64

[ 0.8721 ] Parsing config file :tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg
[ 0.8722 ] Appending platform config data of size :- 1628
[ 0.8722 ]
[ 0.8722 ] Updating mb1-bct with firmware information
[ 0.8730 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_cold_boot_bct_MB1.bct --updatefwinfo flash.xml.bin
[ 0.8737 ] MB1-BCT version: 0xf
[ 0.8742 ]
[ 0.8742 ] Updating mb1-bct with storage information
[ 0.8750 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_cold_boot_bct_MB1.bct --updatestorageinfo flash.xml.bin
[ 0.8757 ] MB1-BCT version: 0xf
[ 0.8761 ]
[ 0.8768 ] tegrahost_v2 --chip 0x18 --align mb1_cold_boot_bct_MB1.bct
[ 0.8775 ]
[ 0.8782 ] tegrahost_v2 --appendsigheader mb1_cold_boot_bct_MB1.bct zerosbk
[ 0.8793 ]
[ 0.8804 ] tegrasign_v2 --key None --list mb1_cold_boot_bct_MB1_sigheader.bct_list.xml
[ 0.8811 ] Assuming zero filled SBK key
[ 0.8829 ]
[ 0.8841 ] tegrahost_v2 --updatesigheader mb1_cold_boot_bct_MB1_sigheader.bct.encrypt mb1_cold_boot_bct_MB1_sigheader.bct.hash zerosbk
[ 0.8851 ]
[ 0.8851 ] Generating recovery mb1-bct
[ 0.8859 ] tegrabct_v2 --chip 0x18 0 --mb1bct mb1_bct.cfg --sdram P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --misc tegra186-mb1-bct-misc-si-l4t.cfg --scr minimal_scr.cfg --pinmux tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg --pmc tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg --pmic tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg --brcommand tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg --prod tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg
[ 0.8869 ] MB1-BCT version: 0xf
[ 0.8871 ] Copying Sdram info from 2 to 3 set
[ 0.9093 ] Packing sdram param for instance[0]
[ 0.9095 ] Packing sdram param for instance[1]
[ 0.9098 ] Packing sdram param for instance[2]
[ 0.9100 ] Packing sdram param for instance[3]

[ 0.9102 ] Parsing config file :tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg
[ 0.9106 ] Appending platform config data of size :- 3048

[ 0.9108 ] Parsing config file :minimal_scr.cfg
[ 0.9111 ] Appending platform config data of size :- 12240

[ 0.9402 ] Parsing config file :tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg
[ 0.9404 ] Appending platform config data of size :- 24
[ 0.9404 ]
[ 0.9404 ] Parsing config file :tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg
[ 0.9404 ] Appending platform config data of size :- 648
[ 0.9404 ]
[ 0.9404 ] Parsing config file :tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg
[ 0.9405 ] Appending platform config data of size :- 64
[ 0.9405 ]
[ 0.9405 ] Parsing config file :tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg
[ 0.9405 ] Appending platform config data of size :- 1628
[ 0.9405 ]
[ 0.9405 ] Updating mb1-bct with firmware information
[ 0.9414 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_bct_MB1.bct --updatefwinfo flash.xml.bin
[ 0.9421 ] MB1-BCT version: 0xf
[ 0.9426 ]
[ 0.9426 ] Updating mb1-bct with storage information
[ 0.9433 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_bct_MB1.bct --updatestorageinfo flash.xml.bin
[ 0.9440 ] MB1-BCT version: 0xf
[ 0.9444 ]
[ 0.9453 ] tegrahost_v2 --chip 0x18 --align mb1_bct_MB1.bct
[ 0.9460 ]
[ 0.9468 ] tegrahost_v2 --appendsigheader mb1_bct_MB1.bct zerosbk
[ 0.9477 ]
[ 0.9489 ] tegrasign_v2 --key None --list mb1_bct_MB1_sigheader.bct_list.xml
[ 0.9496 ] Assuming zero filled SBK key
[ 0.9514 ]
[ 0.9527 ] tegrahost_v2 --updatesigheader mb1_bct_MB1_sigheader.bct.encrypt mb1_bct_MB1_sigheader.bct.hash zerosbk
[ 0.9536 ]
[ 0.9537 ] Copying signatures
[ 0.9547 ] tegrahost_v2 --chip 0x18 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[ 0.9894 ]
[ 0.9894 ] Boot Rom communication
[ 0.9906 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml
[ 0.9916 ] BootRom is not running
[ 6.1128 ]
[ 7.1140 ] tegrarcm_v2 --isapplet
[ 7.1148 ] Applet version 01.00.0000
[ 7.1315 ]
[ 7.1316 ] Sending BCTs
[ 7.1323 ] tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
[ 7.1332 ] Applet version 01.00.0000
[ 7.1752 ] Sending bct_bootrom

[ 0.1094 ] Copying signature to RCM mesages
[ 0.1104 ] tegrarcm_v2 --chip 0x18 --updatesig rcm_list_signed.xml --pubkeyhash pub_key.key
[ 0.1113 ]
[ 0.1113 ] Boot Rom communication
[ 0.1120 ] tegrarcm_v2 --chip 0x18 --rcm rcm_list_signed.xml --skipuid
[ 0.1126 ] RCM version 0X180001
[ 0.1151 ] Boot Rom communication completed[ 1015.7769 ]
Error: Return value 3
Command tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
Failed flashing t186ref.

Is the host a VM? Was the unit in recovery mode at the start? Is this the original micro-B USB cable which came with the devel kit?

I solved it under the command below.
Using original micro-B USB cable .
Thank you for your attention.

I don’t understand how you solved the problem. Can you give more details?
Thanks

@mhallakstamler , please file a new topic for your issue. This issue seems already 2 years ago.