Flashing Jetson Nano sometimes fails with return value 8

When I try to flash the Jetson Nano mutiple times in a row the fash script sometimes fails with return value 8 and sometimes completes successfully. The failures are not alway at exactly but roughly the same step. Once the Nano rebooted automatically while the flash script was running (after probing the target board but before invoking tegraflash). Unfortunately I don’t have the log of when the Nano rebooted while flashing anymore but I attached two of the return value 8 logs below.

###############################################################################
# L4T BSP Information:
# R32 , REVISION: 5.1
###############################################################################
# Target Board Information:
# Name: jetson-nano-devkit, Board Family: t210ref, SoC: Tegra 210, 
# OpMode: production, Boot Authentication: , 
# Disk encryption: disabled ,
###############################################################################
./tegraflash.py --chip 0x21 --applet "/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_recovery.bin" --skipuid --cmd "dump eeprom boardinfo cvm.bin" 
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.0025 ] Generating RCM messages
[   0.0036 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_recovery.bin 0 0
[   0.0047 ] RCM 0 is saved as rcm_0.rcm
[   0.0053 ] RCM 1 is saved as rcm_1.rcm
[   0.0053 ] List of rcm files are saved in rcm_list.xml
[   0.0053 ] 
[   0.0053 ] Signing RCM messages
[   0.0065 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0074 ] Assuming zero filled SBK key
[   0.0121 ] 
[   0.0121 ] Copying signature to RCM mesages
[   0.0131 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0144 ] 
[   0.0144 ] Boot Rom communication
[   0.0154 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml --skipuid
[   0.0166 ] RCM version 0X210001
[   0.2911 ] Boot Rom communication completed
[   1.2987 ] 
[   1.2989 ] dump EEPROM info
[   1.3025 ] tegrarcm --oem platformdetails eeprom /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/cvm.bin
[   1.3054 ] Applet version 00.01.0000
[   1.5482 ] Saved platform info in /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/cvm.bin
[   1.6248 ] 
[   1.6283 ] tegrarcm --reboot recovery
[   1.6312 ] Applet version 00.01.0000
/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tegraflash_internal.py:1978: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if sig_type is not "zerosbk":
/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tegraflash_internal.py:1981: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if sig_type is "oem-rsa":
/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tegraflash_internal.py:2416: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  while count is not 0 and not check_ismb2():
/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tegraflash_internal.py:2425: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  while count is not 0:
[   1.8731 ] 
Board ID(3448) version(400) 
creating dummy /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/badpage.bin
1+0 records in
1+0 records out
4096 bytes (4,1 kB, 4,0 KiB) copied, 8,2807e-05 s, 49,5 MB/s
copying bctfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/BCT/P3448_A00_lpddr4_204Mhz_P987.cfg)... done.
copying bootloader(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cboot.bin)... done.
copying initrd(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/l4t_initrd.img)... done.
	populating kernel to rootfs... done.
	populating initrd to rootfs... done.
	populating /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb to rootfs... done.
Making Boot image... done.
Existing sosfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_recovery.bin) reused.
copying tegraboot(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/nvtboot.bin)... done.
copying cpu_bootloader(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cboot.bin)... done.
copying bpffile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/sc7entry-firmware.bin)... done.
Existing badpagefile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/badpage.bin) reused.
copying wb0boot(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/warmboot.bin)... done.
Existing tosfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tos-mon-only.img) reused.
Existing eksfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/eks.img) reused.
copying dtbfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
Copying nv_boot_control.conf to rootfs
Making system.img... 
	populating rootfs from /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/rootfs ... done.
	populating /boot/extlinux/extlinux.conf ... done.
	Sync'ing system.img ... done.
	Converting RAW image to Sparse image... done.
system.img built successfully. 
Existing tbcfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_cpu.bin) reused.
copying tbcdtbfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
copying cfgfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cfg/flash_l4t_t210_max-spi_sd_p3448.xml) to flash.xml... done.
copying flasher(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cboot.bin)... done.
Existing flashapp(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tegraflash.py) reused.
./tegraflash.py --bl cboot.bin --bct  P3448_A00_lpddr4_204Mhz_P987.cfg --odmdata 0xa4000 --bldtb kernel_tegra210-p3448-0000-p3449-0000-b00.dtb --applet nvtboot_recovery.bin --cmd "flash; reboot"  --cfg flash.xml --chip 0x21    --bins "EBT cboot.bin; DTB tegra210-p3448-0000-p3449-0000-b00.dtb" 
saving flash command in /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/flashcmd.txt
saving Windows flash command to /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/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.0015 ] tegrasign --key None --getmode mode.txt
[   0.0024 ] Assuming zero filled SBK key
[   0.0029 ] 
[   0.0030 ] Generating RCM messages
[   0.0044 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm nvtboot_recovery.bin 0 0
[   0.0053 ] RCM 0 is saved as rcm_0.rcm
[   0.0058 ] RCM 1 is saved as rcm_1.rcm
[   0.0058 ] List of rcm files are saved in rcm_list.xml
[   0.0058 ] 
[   0.0059 ] Signing RCM messages
[   0.0069 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0077 ] Assuming zero filled SBK key
[   0.0126 ] 
[   0.0126 ] Copying signature to RCM mesages
[   0.0136 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0162 ] 
[   0.0162 ] Parsing partition layout
[   0.0178 ] tegraparser --pt flash.xml.tmp
[   0.0197 ] 
[   0.0198 ] Creating list of images to be signed
[   0.0213 ] tegrahost --chip 0x21 0 --partitionlayout flash.xml.bin --list images_list.xml
[   0.0288 ] 
[   0.0289 ] Generating signatures
[   0.0299 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.0310 ] Assuming zero filled SBK key
[   0.0828 ] 
[   0.0828 ] Generating br-bct
[   0.0845 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.cfg --chip 0x21 0
[   0.0852 ] Copying Sdram info from 2 to 3 set
[   0.0888 ] 
[   0.0888 ] Updating boot device parameters
[   0.0898 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatedevparam flash.xml.bin
[   0.0905 ] Warning: No sdram params
[   0.0908 ] 
[   0.0908 ] Updating bl info
[   0.0916 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.0929 ] 
[   0.0929 ] Updating secondary storage information into bct
[   0.0939 ] tegraparser --pt flash.xml.bin --chip 0x21 0 --updatecustinfo P3448_A00_lpddr4_204Mhz_P987.bct
[   0.0953 ] 
[   0.0954 ] Updating Odmdata
[   0.0962 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatefields Odmdata =0xa4000
[   0.1001 ] Warning: No sdram params
[   0.1003 ] 
[   0.1003 ] Get Signed section of bct
[   0.1012 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --listbct bct_list.xml
[   0.1028 ] 
[   0.1028 ] Signing BCT
[   0.1044 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.1051 ] Assuming zero filled SBK key
[   0.1055 ] 
[   0.1056 ] Updating BCT with signature
[   0.1065 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatesig bct_list_signed.xml
[   0.1077 ] 
[   0.1078 ] Copying signatures
[   0.1087 ] tegrahost --chip 0x21 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   0.1124 ] 
[   0.1124 ] Updating BFS information on BCT
[   0.1134 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatebfsinfo flash.xml.bin
[   0.1144 ] 
[   0.1144 ] Boot Rom communication
[   0.1153 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml
[   0.1160 ] BR_CID: 0x321010016445b58008000000170280c0
[   0.2295 ] RCM version 0X210001
[   0.3570 ] Boot Rom communication completed
[   1.3640 ] 
[   1.3641 ] Sending BCTs
[   1.3673 ] tegrarcm --download bct P3448_A00_lpddr4_204Mhz_P987.bct
[   1.3702 ] Applet version 00.01.0000
[   1.6145 ] Sending bct
[   1.6149 ] [................................................] 100%
[   1.8378 ] 
[   1.8410 ] tegrahost --chip 0x21 --align cboot.bin
[   1.8442 ] 
[   1.8474 ] tegrahost --magicid EBT --appendsigheader cboot.bin cboot.bin_blheader
[   1.8548 ] 
[   1.8593 ] tegrasign --key None --list cboot.bin_list.xml
[   1.8637 ] Assuming zero filled SBK key
[   1.9002 ] 
[   1.9016 ] tegrahost --updatesigheader cboot.bin_blheader.encrypt cboot.bin_blheader.hash zerosbk
[   1.9036 ] 
[   1.9054 ] tegrahost --chip 0x21 --align tegra210-p3448-0000-p3449-0000-b00.dtb
[   1.9065 ] 
[   1.9078 ] tegrahost --magicid DTB --appendsigheader tegra210-p3448-0000-p3449-0000-b00.dtb tegra210-p3448-0000-p3449-0000-b00.dtb_blheader
[   1.9098 ] 
[   1.9110 ] tegrasign --key None --list tegra210-p3448-0000-p3449-0000-b00.dtb_list.xml
[   1.9118 ] Assuming zero filled SBK key
[   1.9185 ] 
[   1.9196 ] tegrahost --updatesigheader tegra210-p3448-0000-p3449-0000-b00.dtb_blheader.encrypt tegra210-p3448-0000-p3449-0000-b00.dtb_blheader.hash zerosbk
[   1.9208 ] 
[   1.9211 ] Sending bootloader and pre-requisite binaries
[   1.9219 ] tegrarcm --download ebt cboot.bin.encrypt 0 0 --download rp1 tegra210-p3448-0000-p3449-0000-b00.dtb.encrypt 0
[   1.9226 ] Applet version 00.01.0000
[   2.1663 ] Sending ebt
[   2.1671 ] [................................................] 100%
[   2.2714 ] Sending rp1
[   2.2760 ] [................................................] 100%
[   2.3337 ] 
[   2.3368 ] tegrarcm --boot recovery
[   2.3406 ] Applet version 00.01.0000
[   2.5875 ] 
[   2.5876 ] Retrieving storage infomation
[   2.5905 ] tegrarcm --oem platformdetails storage storage_info.bin
[   2.5930 ] Applet is not running on device. Continue with Bootloader
[   3.4073 ] 
[   3.4130 ] tegradevflash --oem platformdetails storage storage_info.bin
[   3.4160 ] Cboot version 00.01.0000
[   3.5299 ] Saved platform info in storage_info.bin
[   3.5317 ] 
[   3.5318 ] Flashing the device
[   3.5375 ] tegradevflash --pt flash.xml.bin --storageinfo storage_info.bin --create
[   3.5410 ] Cboot version 00.01.0000
[   3.6545 ] Writing partition GPT with gpt.bin
[   3.6552 ] [................................................] 100%
[   3.6610 ] Writing partition PT with flash.xml.bin
[  18.8516 ] [................................................] 100%
[  18.8556 ] Writing partition NVC with nvtboot.bin.encrypt
[  19.1060 ] [................................................] 100%
[  24.6643 ] 
Error: Return value 8
Command tegradevflash --pt flash.xml.bin --storageinfo storage_info.bin --create
Failed flashing t210ref.
###############################################################################
# L4T BSP Information:
# R32 , REVISION: 5.1
###############################################################################
# Target Board Information:
# Name: jetson-nano-devkit, Board Family: t210ref, SoC: Tegra 210, 
# OpMode: production, Boot Authentication: , 
# Disk encryption: disabled ,
###############################################################################
./tegraflash.py --chip 0x21 --applet "/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_recovery.bin" --skipuid --cmd "dump eeprom boardinfo cvm.bin" 
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.0023 ] Generating RCM messages
[   0.0031 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_recovery.bin 0 0
[   0.0039 ] RCM 0 is saved as rcm_0.rcm
[   0.0048 ] RCM 1 is saved as rcm_1.rcm
[   0.0048 ] List of rcm files are saved in rcm_list.xml
[   0.0048 ] 
[   0.0048 ] Signing RCM messages
[   0.0064 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0071 ] Assuming zero filled SBK key
[   0.0149 ] 
[   0.0149 ] Copying signature to RCM mesages
[   0.0158 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0169 ] 
[   0.0169 ] Boot Rom communication
[   0.0177 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml --skipuid
[   0.0185 ] RCM version 0X210001
[   0.2997 ] Boot Rom communication completed
[   1.3068 ] 
[   1.3069 ] dump EEPROM info
[   1.3083 ] tegrarcm --oem platformdetails eeprom /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/cvm.bin
[   1.3093 ] Applet version 00.01.0000
[   1.5562 ] Saved platform info in /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/cvm.bin
[   1.6326 ] 
[   1.6338 ] tegrarcm --reboot recovery
[   1.6350 ] Applet version 00.01.0000
[   1.8848 ] 
Board ID(3448) version(400) 
copying bctfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/BCT/P3448_A00_lpddr4_204Mhz_P987.cfg)... done.
copying bootloader(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cboot.bin)... done.
copying initrd(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/l4t_initrd.img)... done.
	populating kernel to rootfs... done.
	populating initrd to rootfs... done.
	populating /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb to rootfs... done.
Making Boot image... done.
Existing sosfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_recovery.bin) reused.
copying tegraboot(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/nvtboot.bin)... done.
copying cpu_bootloader(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cboot.bin)... done.
copying bpffile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/sc7entry-firmware.bin)... done.
Existing badpagefile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/badpage.bin) reused.
copying wb0boot(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/warmboot.bin)... done.
Existing tosfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tos-mon-only.img) reused.
Existing eksfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/eks.img) reused.
copying dtbfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
Copying nv_boot_control.conf to rootfs
Making system.img... 
	populating rootfs from /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/rootfs ... done.
	populating /boot/extlinux/extlinux.conf ... done.
	Sync'ing system.img ... done.
	Converting RAW image to Sparse image... done.
system.img built successfully. 
Existing tbcfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/nvtboot_cpu.bin) reused.
copying tbcdtbfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
copying cfgfile(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cfg/flash_l4t_t210_max-spi_sd_p3448.xml) to flash.xml... done.
copying flasher(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/t210ref/cboot.bin)... done.
Existing flashapp(/home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/tegraflash.py) reused.
./tegraflash.py --bl cboot.bin --bct  P3448_A00_lpddr4_204Mhz_P987.cfg --odmdata 0xa4000 --bldtb kernel_tegra210-p3448-0000-p3449-0000-b00.dtb --applet nvtboot_recovery.bin --cmd "flash; reboot"  --cfg flash.xml --chip 0x21    --bins "EBT cboot.bin; DTB tegra210-p3448-0000-p3449-0000-b00.dtb" 
saving flash command in /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/bootloader/flashcmd.txt
saving Windows flash command to /home/cakre/Documents/autoflash/192.168.56.0/hemistereo_r32.5_210/r32.5/210/hemistereo/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.0016 ] tegrasign --key None --getmode mode.txt
[   0.0026 ] Assuming zero filled SBK key
[   0.0043 ] 
[   0.0044 ] Generating RCM messages
[   0.0060 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm nvtboot_recovery.bin 0 0
[   0.0109 ] RCM 0 is saved as rcm_0.rcm
[   0.0125 ] RCM 1 is saved as rcm_1.rcm
[   0.0126 ] List of rcm files are saved in rcm_list.xml
[   0.0126 ] 
[   0.0126 ] Signing RCM messages
[   0.0136 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0148 ] Assuming zero filled SBK key
[   0.0240 ] 
[   0.0241 ] Copying signature to RCM mesages
[   0.0252 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0270 ] 
[   0.0271 ] Parsing partition layout
[   0.0289 ] tegraparser --pt flash.xml.tmp
[   0.0308 ] 
[   0.0309 ] Creating list of images to be signed
[   0.0326 ] tegrahost --chip 0x21 0 --partitionlayout flash.xml.bin --list images_list.xml
[   0.0403 ] 
[   0.0404 ] Generating signatures
[   0.0416 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.0427 ] Assuming zero filled SBK key
[   0.1201 ] 
[   0.1202 ] Generating br-bct
[   0.1221 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.cfg --chip 0x21 0
[   0.1234 ] Copying Sdram info from 2 to 3 set
[   0.1283 ] 
[   0.1283 ] Updating boot device parameters
[   0.1296 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatedevparam flash.xml.bin
[   0.1309 ] Warning: No sdram params
[   0.1312 ] 
[   0.1312 ] Updating bl info
[   0.1328 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.1348 ] 
[   0.1350 ] Updating secondary storage information into bct
[   0.1364 ] tegraparser --pt flash.xml.bin --chip 0x21 0 --updatecustinfo P3448_A00_lpddr4_204Mhz_P987.bct
[   0.1416 ] 
[   0.1416 ] Updating Odmdata
[   0.1428 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatefields Odmdata =0xa4000
[   0.1437 ] Warning: No sdram params
[   0.1442 ] 
[   0.1442 ] Get Signed section of bct
[   0.1453 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --listbct bct_list.xml
[   0.1467 ] 
[   0.1467 ] Signing BCT
[   0.1503 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.1528 ] Assuming zero filled SBK key
[   0.1533 ] 
[   0.1534 ] Updating BCT with signature
[   0.1543 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatesig bct_list_signed.xml
[   0.1567 ] 
[   0.1568 ] Copying signatures
[   0.1576 ] tegrahost --chip 0x21 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   0.1613 ] 
[   0.1614 ] Updating BFS information on BCT
[   0.1625 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatebfsinfo flash.xml.bin
[   0.1638 ] 
[   0.1638 ] Boot Rom communication
[   0.1646 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml
[   0.1653 ] BR_CID: 0x321010016445b58008000000170280c0
[   0.2832 ] RCM version 0X210001
[   0.4113 ] Boot Rom communication completed
[   1.4183 ] 
[   1.4183 ] Sending BCTs
[   1.4192 ] tegrarcm --download bct P3448_A00_lpddr4_204Mhz_P987.bct
[   1.4200 ] Applet version 00.01.0000
[   1.6650 ] Sending bct
[   1.6653 ] [................................................] 100%
[   1.8884 ] 
[   1.8921 ] tegrahost --chip 0x21 --align cboot.bin
[   1.8953 ] 
[   1.8980 ] tegrahost --magicid EBT --appendsigheader cboot.bin cboot.bin_blheader
[   1.9024 ] 
[   1.9046 ] tegrasign --key None --list cboot.bin_list.xml
[   1.9062 ] Assuming zero filled SBK key
[   1.9224 ] 
[   1.9237 ] tegrahost --updatesigheader cboot.bin_blheader.encrypt cboot.bin_blheader.hash zerosbk
[   1.9254 ] 
[   1.9268 ] tegrahost --chip 0x21 --align tegra210-p3448-0000-p3449-0000-b00.dtb
[   1.9278 ] 
[   1.9287 ] tegrahost --magicid DTB --appendsigheader tegra210-p3448-0000-p3449-0000-b00.dtb tegra210-p3448-0000-p3449-0000-b00.dtb_blheader
[   1.9304 ] 
[   1.9318 ] tegrasign --key None --list tegra210-p3448-0000-p3449-0000-b00.dtb_list.xml
[   1.9326 ] Assuming zero filled SBK key
[   1.9385 ] 
[   1.9395 ] tegrahost --updatesigheader tegra210-p3448-0000-p3449-0000-b00.dtb_blheader.encrypt tegra210-p3448-0000-p3449-0000-b00.dtb_blheader.hash zerosbk
[   1.9409 ] 
[   1.9412 ] Sending bootloader and pre-requisite binaries
[   1.9420 ] tegrarcm --download ebt cboot.bin.encrypt 0 0 --download rp1 tegra210-p3448-0000-p3449-0000-b00.dtb.encrypt 0
[   1.9428 ] Applet version 00.01.0000
[   2.1881 ] Sending ebt
[   2.1883 ] [................................................] 100%
[   2.2907 ] Sending rp1
[   2.2953 ] [................................................] 100%
[   2.3524 ] 
[   2.3534 ] tegrarcm --boot recovery
[   2.3545 ] Applet version 00.01.0000
[   2.6015 ] 
[   2.6015 ] Retrieving storage infomation
[   2.6032 ] tegrarcm --oem platformdetails storage storage_info.bin
[   2.6052 ] Applet is not running on device. Continue with Bootloader
[   3.3954 ] 
[   3.4004 ] tegradevflash --oem platformdetails storage storage_info.bin
[   3.4058 ] Cboot version 00.01.0000
[   3.5200 ] Saved platform info in storage_info.bin
[   3.5212 ] 
[   3.5212 ] Flashing the device
[   3.5221 ] tegradevflash --pt flash.xml.bin --storageinfo storage_info.bin --create
[   3.5227 ] Cboot version 00.01.0000
[   3.6564 ] Writing partition GPT with gpt.bin
[   3.6567 ] [................................................] 100%
[  18.7984 ] 
Error: Return value 8
Command tegradevflash --pt flash.xml.bin --storageinfo storage_info.bin --create
Failed flashing t210ref.

After investigating further I noticed that every time I set the Jetson Nano into recovery mode with sudo reboot --force forced-recovery it leaves this mode after about one to two minutes (I timed it multiple times). If I put the Nano into recovery mode by bridging the FC REC pin to ground it stays in this mode without rebooting automatically.

I would suggest always use the hardware pin to trigger the RCM.