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.

OMAP L-138 NAND Flash programming

Other Parts Discussed in Thread: OMAP-L138, CCSTUDIO, OMAP-L137

Hello

I'm working on a project that requires an easy way of programming U-Boot on a ""clean" NAND Flash memory. I've found this on OMAP L-138 wiki:

http://tiexpressdsp.com/index.php/GSG:_OMAP-L138_DVEVM_Additional_Procedures#Flashing_images_to_NAND_Flash

From what I understand this describes the way of programming memory only through a CCStudio application. We are looking for something more flexible that would involve first loading some boot-strap program to RAM (possibly through a serial port) and then loading U-Boot in a similar manner.  This way U-Boot would be responsible for writing NAND.

Do you have any tips on that topic. Am I missing the point here, or maybe you are planning on making the "first boot" process looking in a similar way that I've desribed?

Regards.

Szymon

  •  

    We have a serial flasher for spi flash, but it has not been updated for NAND yet. 

    One interim solution is to produce an AIS boot image with the binary u-boot image using the AISGen GUI and then boot this u-boot in UART boot mode.  After booting is complete you can go open your serial terminal program, and then communicate with u-boot and use it's commands to flash the NAND.

    I'm not sure if this is easier than Connecting to CCS, but is an alternative that you can try.

     

  • Thank you, it certainly helped me get back on a good track. In the link you provided I've found a program called UART Boot Host v1.0:

    http://www-s.ti.com/sc/techlit/sprab04.zip

    Using it seems very promising but I'm experiencing a problem. At the moment I'm testing the ARM side of OMAP-L138 using the board form Logic:

    http://www.logicpd.com/products/development-kits/zoom-omap-l138-experimenter-kit

    When I set the DIP switches in UART boot mode the device sends the BOOTME string as it should, but at a speed of 115200 bps, not 230400, as your application expects. The BOOTME message gets corrupted and booting aborts. How can I get past this problem? Is there a way of changing your application's UART speed so that it matches the one from the board?

    Also, are you planning on enabling the NAND and NOR Flash programming capabilities for sfh_OMAP-L138.exe application? If so, what time frame are we looking at for when this program would be available? From what I've read here:

    http://wiki.davincidsp.com/index.php/Serial_Boot_and_Flash_Loading_Utility

    flashing of these memories is possible on other products. I think that would solve my problem completely.

  •  

    Szymon Kuklinski said:

    Thank you, it certainly helped me get back on a good track. In the link you provided I've found a program called UART Boot Host v1.0:

    http://www-s.ti.com/sc/techlit/sprab04.zip

    Using it seems very promising but I'm experiencing a problem. At the moment I'm testing the ARM side of OMAP-L138 using the board form Logic:

    http://www.logicpd.com/products/development-kits/zoom-omap-l138-experimenter-kit

    When I set the DIP switches in UART boot mode the device sends the BOOTME string as it should, but at a speed of 115200 bps, not 230400, as your application expects. The BOOTME message gets corrupted and booting aborts. How can I get past this problem? Is there a way of changing your application's UART speed so that it matches the one from the board?

    The one you are getting is for OMAP-L137, for OMAP-L138 please see:

    http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=sprab41a

    Szymon Kuklinski said:

    Also, are you planning on enabling the NAND and NOR Flash programming capabilities for sfh_OMAP-L138.exe application? If so, what time frame are we looking at for when this program would be available? From what I've read here:

    http://wiki.davincidsp.com/index.php/Serial_Boot_and_Flash_Loading_Utility

    flashing of these memories is possible on other products. I think that would solve my problem completely.

    I do not have a time frame, I will investigate it.

     

  • Hello again

    I encountered another problem while booting through UART Boot Host. I created an AIS image of the u-boot binary provided in your package (http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/omap_l138/1_00/latest//exports/OMAP_L138_arm_1_00_00_06.tar.gz) setting the boot mode to UART, configuring DDR like this:

    DRPYC1R 0x000000C4
    SDCR 0x0A034622
    SDCR2 0x00000000
    SDTIMR1 0x184929C8
    SDTIMR2 0x380FC700
    SDRCR 0x00000406

    These values (not sure if they are correct) are taken from the file device.c in the source of the User Boot-Loader (UBL). I leave the PLL0 and PLL1 at their defalt values. When i create the image with option "Enable CRC" selected the booting takes pralce like this:

    (File IO): Read 155984 bytes from file C:\Documents and Settings\Notebook_K12\Pulpit\u-boot.ais.
    (Serial Port): Opening COM1 at 115200 baud...
    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME...
    (AIS Parse): Performing Start-Word Sync...
    (AIS Parse): Performing Ping Opcode Sync...
    (AIS Parse): Processing command 0: 0x5853590D.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Executing function...
    (AIS Parse): Processing command 1: 0x5853590D.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Executing function...
    (AIS Parse): Processing command 2: 0x58535903.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): CRC enabled.
    (AIS Parse): Processing command 3: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 552-byte section to address 0x80000000.
    (AIS Parse): Processing command 4: 0x58535902.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Requesting CRC...
    (AIS Parse): CRC passed!
    (AIS Parse): Processing command 5: 0x58535907.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading boot table...
    (AIS Parse): Processing command 6: 0x58535907.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading boot table...
    (AIS Parse): Processing command 7: 0x58535907.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading boot table...
    (AIS Parse): Processing command 8: 0x58535907.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading boot table...
    (AIS Parse): Processing command 9: 0x58535907.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading boot table...
    (AIS Parse): Processing command 10: 0x58535907.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading boot table...
    (AIS Parse): Processing command 11: 0x58535905.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Performing jump...
    (AIS Parse): Jump to address 0x80000000.
    (AIS Parse): Processing command 12: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 155204-byte section to address 0x80000000.
    (AIS Parse): Processing command 13: 0x58535902.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Requesting CRC...
    (AIS Parse): CRC failed!  Sending STARTOVER...
    (AIS Parse): 4294812068-byte seek applied.
    (AIS Parse): Processing command 14: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (Serial Port): Read error! (Operation timeout.)
    (AIS Parse): I/O Error in read!
    (AIS Parse): Opcode Sync failed after 11 consecutive I/O failures.
    (AIS Parse): Boot aborted.
    (Serial Port): Closing COM1.

    The CRC fails so I suspect that there may be something wrong with my boot script configuration. I do realize that this is board-specific, but your whole OMAP L-138 wiki is based on Logic eXperimenter Kit and EVM boards so I would like to ask if you know how to set-up the booting procedure accordingly?

    EDIT: My colleague found this: http://tiexpressdsp.com/index.php/Programming_mDDR/DDR2_EMIF_on_OMAP-L1x/C674x. I'm working on calculating the values...

  • I used the register calculator (http://tiexpressdsp.com/images/d/dd/MDDR_DDR2_Memory_Controller_Register_Calc.zip) and the information given on the DDR memory manufacturer (http://download.micron.com/pdf/datasheets/dram/mobile/512mb_ddr_mobile_sdram_t47m.pdf) to compute the correct values, with no luck so far. I also looked into the code in the bsl/src/evmomapl138.c file provided by Logic for their board (http://support.logicpd.com/downloads/1236/1014013A_OMAP-L138_GEL_BSL_Files.zip). The values of registers given there differ from what I've calculated (mine given first):

    DRPYC1R 0x000000C3 vs 0x000000C4
    SDCR       0x0283C421 vs 0x0A034622
    SDCR2     0x00000000 vs 0x00000000
    SDTIMR1  0x18A729CB vs 0x20923A89
    SDTIMR2  0x380F0900 vs 0x0015C720
    SDRCR    0x0000040D vs 0x00000492

    Do you have any ideas how to get past this? I'm running out of ideas myself...

    Regards