Error: Return value 3 when flashing nano on custom board

I’m trying to flash my nano on a custom board. I haven’t had hardware issues in the past and when I connect the custom board in recovery mode to a Ubuntu PC, it is successfully detected and the flashing process does begin.

I had customized the pinmux spreadsheet and then copied the gpio and pinmux files to my gpio and pinmux config in the source folder as before. I changed spidev to yes instead of module in the .config file of the output folder. I changed nothing else.

When I start the flashing process it goes to writting partition APP and then I get an error always at 7% into the process as the image below. I’m not sure what’s happening because I haven’t done anything different than the past. The USB port for flashing is done in the same way as the previous version of our custom board and it worked on the old version so I don’t think that there’s a hardware issue with the traces; all USB ports work just fine.

Dump the log, please:

[0006.847] Enabled early print
[0006.850] [L4T TegraBoot] (version ▒߀bݵ▒▒)
[0006.854] Processing in recovery mode
[0006.858] A02 Bootrom Patch rev = 1023
[0006.861] Power-up reason: pmc por
[0006.865] Established communication link with host
[0007.925] NvTbootI2cWrite(): error code 0x00045100 Error while starting write transaction
[0007.933] NvTbootI2cDeviceRead(): error code 0x00045001 Error while sending the offset to slave
[0007.941] NvTbootI2c: Read failed for slave 0xac, offset 0x00 with error code 0x00045001
[0037.738] Enabled early print
[0037.741] [L4T TegraBoot] (version ▒߀bݵ▒▒)
[0037.745] Processing in recovery mode
[0037.749] A02 Bootrom Patch rev = 1023
[0037.752] Power-up reason: software reset
[0037.756] Established communication link with host
[0038.760] Odmdata from BCT: 0x000a4000
[0038.764] DebugPort= 0x3
[0038.766] SkipQspiOnly= 0x0
[0038.819] BoardId read from EEPROM/NCT: 3448
[0038.823] BoardID = 3448, SKU = 0x0
[0038.850] NvTbootInit_Porg: Setting GPIO_A6 for HDMI …
[0038.855] max77620 setting MBLPD bit
[0038.859] No Battery Present
[0038.861] RamCode = 0
[0038.864] Platform has DDR4 type RAM
[0038.867] max77620 disabling SD1 Remote Sense
[0038.871] Setting DDR voltage to 1125mv
[0038.875] Serial Number of Pmic Max77663: 0x2b06f0
[0038.883] Entering ramdump check
[0038.886] Get RamDumpCarveOut = 0x0
[0038.889] RamDumpCarveOut=0x0, RamDumperFlag=0xe59ff3f8
[0038.894] Last reboot was clean, booting normally!
[0038.899] Sdram initialization is successful
[0038.903] SecureOs Carveout Base=0x00000000ff800000 Size=0x00800000
[0038.909] Lp0 Carveout Base=0x00000000ff780000 Size=0x00001000
[0038.915] BpmpFw Carveout Base=0x00000000ff700000 Size=0x00080000
[0038.921] GSC1 Carveout Base=0x00000000ff600000 Size=0x00100000
[0038.927] GSC2 Carveout Base=0x00000000ff500000 Size=0x00100000
[0038.933] GSC4 Carveout Base=0x00000000ff400000 Size=0x00100000
[0038.939] GSC5 Carveout Base=0x00000000ff300000 Size=0x00100000
[0038.944] GSC3 Carveout Base=0x000000017f300000 Size=0x00d00000
[0038.961] RamDump Carveout Base=0x00000000ff280000 Size=0x00080000
[0038.967] Platform-DebugCarveout: 0
[0038.970] Downloaded BCT successfully
[0039.213] Downloaded Bootloader successfully
[0039.269] Downloaded rp1 successfully
[0039.351] MAX77620_GPIO5 configured
[0039.354] CPU power rail is up
[0039.357] CPU clock enabled
[0039.361] Performing RAM repair
[0039.364] Updating A64 Warmreset Address to 0x92c002e9
[0039.370] Enable APE clock/reset
[0039.373] Error in NvTbootGetTOSBinaryLength: 0x11 !
[0039.378] Loading Secure OS image failed.
[0039.382] Set NvDecSticky Bits
[0039.385] GSC2 address ff53fffc value c0edbbcc
[0039.392] GSC MC Settings done
[0039.396] Next binary entry address: 0x92c00258
[0039.400] BoardId: 3448
[0039.403] Overriding pmu board id with proc board id
[0039.408] Display board id is not available
[0039.412] Starting CPU & Halting co-processor
[0040.368]
[0040.370] Debug Init done
[0040.373] Marked DTB cacheable
[0040.376] Bootloader DTB loaded at 0x83000400
[0040.380] DeviceTree Init done
[0040.393] Pinmux applied successfully
[0040.398] gicd_base: 0x50041000
[0040.401] gicc_base: 0x50042000
[0040.404] Interrupts Init done
[0040.408] Using base:0x60005090 & irq:208 for tick-timer
[0040.414] Using base:0x60005098 for delay-timer
[0040.418] platform_init_timer: DONE
[0040.422] Timer(tick) Init done
[0040.425] osc freq = 38400 khz
[0040.429]
[0040.430] Welcome to L4T Cboot
[0040.433]
[0040.434] Cboot Version: 00.00.2018.01-t210-a2f2e4b8
[0040.439] calling constructors
[0040.442] initializing heap
[0040.445] initializing threads
[0040.448] initializing timers
[0040.451] creating bootstrap completion thread
[0040.455] top of bootstrap2()
[0040.458] CPU: ARM Cortex A57
[0040.461] CPU: MIDR: 0x411FD071, MPIDR: 0x80000000
[0040.466] initializing platform
[0040.473] Manufacturer: MF = 0xc2, ID MSB = 0x25
[0040.478] ID LSB = 0x36, ID-CFI len = 194 bytes
[0040.482] Macronix QSPI chip present
[0040.486] SPI device register
[0040.489] init boot device
[0040.491] allocating memory for boot device(SPI)
[0040.496] registering boot device
[0040.505] sdmmc node status = okay
[0040.508] sdcard instance = 0
[0040.511] sdmmc cd-inverted
[0040.514] sdcard gpio handle 0x5b
[0040.517] sdcard gpio pin 0xc9
[0040.520] sdcard gpio flags 0x0
[0040.523] vmmc-supply 0x9d
[0040.526] Instance: 0
[0040.528] Allocating memory for context
[0040.532] enabling clock
[0040.534] sd card init
[0040.536] Check card present and stable
[0040.540] Send command 0
[0040.685] Send command 3
[0040.689] Set RCA for the card
[0040.692] Query card specific data by command 9
[0040.699] Parse CSD data
[0040.701] Send command 7
[0040.712] Calling sd device register
[0040.715] Init sdcard
[0040.717] Allocating memory for boot device
[0040.721] Registering user device
[0040.734] of_register: registering tegra_udc to of_hal
[0040.739] of_register: registering inv20628-driver to of_hal
[0040.745] of_register: registering ads1015-driver to of_hal
[0040.751] of_register: registering lp8557-bl-driver to of_hal
[0040.756] of_register: registering bq2419x_charger to of_hal
[0040.762] of_register: registering bq27441_fuel_gauge to of_hal
[0040.774] gpio framework initialized
[0040.777] of_register: registering tca9539_gpio to of_hal
[0040.783] of_register: registering tca9539_gpio to of_hal
[0040.788] of_register: registering i2c_bus_driver to of_hal
[0040.793] of_register: registering i2c_bus_driver to of_hal
[0040.799] of_register: registering i2c_bus_driver to of_hal
[0040.805] pmic framework initialized
[0040.808] of_register: registering max77620_pmic to of_hal
[0040.814] regulator framework initialized
[0040.817] of_register: registering tps65132_bl_driver to of_hal
[0040.823] initializing target
[0040.829] gpio_driver_register: register ‘tegra_gpio_driver’ driver
[0040.838] board ID = D78, board SKU = 0
[0040.842] Skipping Z3!
[0040.847] fixed regulator driver initialized
[0040.864] initializing OF layer
[0040.868] of_children_init: Ops found for compatible string nvidia,tegra210-i2c
[0040.886] I2C Bus Init done
[0040.889] of_children_init: Ops found for compatible string nvidia,tegra210-i2c
[0040.899] I2C Bus Init done
[0040.901] of_children_init: Ops found for compatible string nvidia,tegra210-i2c
[0040.912] I2C Bus Init done
[0040.914] of_children_init: Ops found for compatible string nvidia,tegra210-i2c
[0040.925] I2C Bus Init done
[0040.927] of_children_init: Ops found for compatible string nvidia,tegra210-i2c
[0040.938] I2C Bus Init done
[0040.940] of_children_init: Ops found for compatible string maxim,max77620
[0040.951] max77620_init using irq 118
[0040.956] register ‘maxim,max77620’ pmic
[0040.960] gpio_driver_register: register ‘max77620-gpio’ driver
[0040.966] of_children_init: Ops found for compatible string nvidia,tegra210-i2c
[0040.977] I2C Bus Init done
[0040.980] Applying platform configs
[0040.987] platform-init is not present. Skipping
[0040.992] calling apps_init()
[0041.020] Found 1 GPT partitions in “sd0”
[0041.024] Proceeding to flashing Server
[0041.028] usbdcd_reinit Initialize driver to use already enumerated device
[0041.035] nv3p_priv_usbf_open USB configuration success
[0041.126] Writing GPT partition
[0041.131] Erasing Boot device
[0041.134] device_write_gpt: Erasing boot device spiflash0
[0056.388] Erasing Storage Device
[0056.391] Writing protective mbr
[0056.402] Writing primary GPT
[0056.422] Writing secondary GPT
[0056.458] Found 1 GPT partitions in “sd0”
[0056.464] Writing PT partition
[0060.374] partition PT write successful.
[0060.381] Writing NVC partition
[0070.402] partition NVC write successful.
[0070.408] Writing NVC_R partition
[0080.442] partition NVC_R write successful.
[0080.447] Writing TBC partition
[0084.621] partition TBC write successful.
[0084.626] Writing RP1 partition
[0099.053] partition RP1 write successful.
[0099.059] Writing EBT partition
[0128.137] partition EBT write successful.
[0128.143] Writing WB0 partition
[0128.411] partition WB0 write successful.
[0128.417] Writing BPF partition
[0128.685] partition BPF write successful.
[0128.691] Writing TOS partition
[0132.133] partition TOS write successful.
[0132.139] Writing DTB partition
[0146.566] partition DTB write successful.
[0146.572] Writing LNX partition
[0186.393] partition LNX write successful.
[0186.399] Writing EKS partition
[0186.667] partition EKS write successful.
[0186.673] Writing BMP partition
[0195.730] partition BMP write successful.
[0195.735] Writing RP4 partition
[0203.571] partition RP4 write successful.
[0203.577] Writing VER_b partition
[0203.851] partition VER_b write successful.
[0203.857] Writing VER partition
[0204.125] partition VER write successful.
[0204.131] Writing APP partition
0▒ 0v<▒
▒@▒▒▒▒@▒?▒▒ >8▒▒Q

Then are you able to flash the same module when it’s connected to a DevKit?

do you make sure you use a good and short USB cable from a reputable brand like Anker?

I was able to flash the same module with the devkit, sorry I should have done that before posting this issue.

I tried using different usb cables on our custom board to no avail.

I tried flashing it on our previous board design that used to work and that one isn’t working either now.

So where things are right now is that on our custom board, our ubuntu dev PC will detect the nano and allow the process of flashing to begin but just always fails at flashing APP about 10% into the process. I’m thinking now that it might be a trace impedance issue on the differential pairs. I’m assuming though that in the beginning of the flashing process, when it flashes the smaller partitions, the data transfer rate is low or short-lived, but when it comes to the main APP partitions where it copies the OS image it is more constant and results in enough noise to interrupt the process.

The traces on this new board are only about 1 cm long so they’re very short. I never had issues using a usb to ethernet adaptor on the other USB port which has the same trace impedance as the usb port used to flash the board.

Would you agree with that statement, or could there be a different reason off the top of your head?

Thank you.

It does sound reasonable.
It’s something abouut the hardware design of the carrier board.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.