This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320DM6446: UBL NAND boot issues migrating from AZWTA to BZWTA

Part Number: TMS320DM6446

We have a mature product using AZWTA that we bring up with a modified version of DVFlasher 1.14 and the associated UBL from around 2007.  We modified them as necessary for our custom hardware and have been using this configuration for many years.  We have attempted to update to the BZWTA and have had some issues loading and booting NAND flash.

First, I tried just resizing UBL by modifying the padding option in the makefile.  I tried removing all padding, as well as sizing it to 12KB and 13.5KB.  In all cases, I got timeouts when erasing NAND flash:

-----------------------------------------------------

TI DVFlasher Host Program for DM644x
(C) 2007, Texas Instruments, Inc.
-----------------------------------------------------


Flashing NAND with u-boot.bin.


Attempting to connect to device COM6...
Press any key to end this program at any time.


Waiting for DVEVM...
BOOTME commmand received. Returning ACK and header...
ACK command sent. Waiting for BEGIN command...
DVEVM: BEGIN
BEGIN commmand received. Sending CRC table...
CRC table sent. Waiting for DONE...
DONE received. Sending the UART UBL file...
DONE received. UART UBL file was accepted.
UART UBL Transmitted successfully.

DVEVM: FFFFFFFF DDR2 Mem failed at location 0
DVEVM: TI UBL Version: 2.00, Flash type: NAND
DVEVM: Booting PSP Boot Loader
DVEVM: PSPBootMode = NAND

WARNING! The DM644x is NOT in UART boot mode!
Only continue if you are sure of what you are doing.

Continue (Y/N) ? y

Waiting for UBL on DVEVM...
UBL's BOOTPSP commmand received. Returning CMD and command...
CMD value sent.
SENDUBL received. Returning ACK and header for UBL data...
ACK command sent. Waiting for BEGIN command...
UART UBL's BEGIN commmand received. Sending the Flash UBL code...
Flash UBL code sent. Waiting for DONE...
DONE received. All bytes of Flash UBL code received...
DONE received. Flash UBL S-record decoded correctly.
DVEVM: Initializing NAND flash...
DVEVM: Manufacturer ID = 0x00000020
DVEVM: Device ID = 0x00000036
DVEVM: Pages Per Block = 0x00000020
DVEVM: Number of Blocks = 0x00001000
DVEVM: Bytes Per Page = 0x00000200
DVEVM: Writing UBL to NAND flash
DVEVM: Number of blocks needed for header and data: 0x00000001
DVEVM: Attempting to start in block number 0x00000001.
DVEVM: Unprotecting blocks 0x00000001 through 0x00000001.
DVEVM: Erasing blocks 0x00000001 through 0x00000001.
DVEVM: NANDWaitForRdy() Timeout!

Next, with the 12KB UBL, I updated the call to NAND_WaitForRdy(NAND_TIMEOUT) in NAND_EraseBlocks(), increasing the timeout to 10*NAND_TIMEOUT.  This resulted in all my timeout errors going away, and all of my flashing steps appeared to work.  However, upon resetting the DaVinci, I found that UBL would not boot, and RBL continued to print "BOOTME".  I attempted to erase NAND and try again, but found that U-boot was correctly flashed, and when UBL was loaded from the serial port, it booted U-boot instead of printing "BOOTPSP".  I had to erase NAND from U-boot with "nand erase clean", but the same thing happened on multiple attempts and different hardware.

Since the migration guide only mentioned the bootloader size being an issue, and I found the problem with the delays, I'm wondering if there have been other UBL updates assumed to be present.  We do not want to make major changes to this mature product and the associated build/load machines, so I am hoping there may be a patch I could apply to U-boot, rather than try to bring up the new flash utilities for our custom hardware.

Are there any other known changes needed to UBL to boot it from NAND flash with the new silicon revision?