Reflashing Jetson TK1 fails

We are trying to reflash jetson tk1 following the quick start guide http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/l4t_quick_start_guide.txt
but flashing fails with the following error,

[i]waiting for bootloader to initialize
bootloader downloaded successfully
ML execution and Cpu Handover took 2 Secs
Partition backup took 0 Secs
setting device: 2 3
deleting device partitions
creating partition: BCT
failed executing command 17 NvError 0x120002
command failure/warning: create failed (bad data)
bootloader status: specified device is invalid (code: 6) message: nverror:0x4 (0x4) CreatePartition 1756 flags: 0

Failed flashing ardbeg.[/i]

We tried two versions of L4T 21.3 and 21.7, both showed the same error.

This is a USB error:

0x00120002, "packet was nacked")

Are you using a VM?

No, my host system is ubuntu 14.04.

What does USB error mean?

The flash occurs over the micro-B USB cable. The Jetson goes into recovery mode and becomes a custom USB device which the driver package on the host PC understands. At some point while the driver package was talking to the Jetson the traffic failed to acknowledge. It is a communications error.

Many times the issue is because it is a VM (VMs don’t own the USB ports and are guests depending on the host to pass the traffic through…and the VM doesn’t always do it right). This does sometimes happen to people without a VM, but a VM is the number one failure case.

One issue would be if you used a different cable than the one which was supplied with the Jetson. Many people assume charging cables are the same, but they are not since they are not really expected as high speed data cables (quality is bad on most cell phone style cables). Was this the supplied cable (because it is a known quality)? If you don’t have the original cable, then you probably need to get a higher quality micro-B USB cable.

If this was the supplied cable, then you can still try different ports directly without any HUB. If you are not using a HUB and the cable is good, then you could try connecting through the HUB and then the HUB to the PC (then the Jetson would need to communicate correctly with the HUB instead of the PC…the HUB would talk to the PC…if there is some sort of quirk of how the hardware interacts this might fix it).