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.

Freezed on 'Waiting for SFT for OMAPL137' when trying to use Serial Flash Utility

Other Parts Discussed in Thread: OMAP-L137

Hi, 

I am trying to rebuild the serial flash utility for my board (OMAPL137 with 20Mhz clock which gives uart baudrate of 96k). 

To begin with, i need to erase the spi flash. But it gets stuck at waiting on SFT. 

My flash is connected to SPI0. 

I am following below links. 

processors.wiki.ti.com/.../Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138

I have seen a lot of threads on this topic. But from none have i been able to extract what is actually wrong.

Would you guys be able to shed some light on why i am not able to erase ? 

Thanks, 

AQ

  • Have you modified the SFH code for your custom DDR and input clock ?

    Generally, this issue is due to mis-configuration of DDR and Input clock, so please check that.

    What option you passed to run the sfh for SPI erase ?

    You need to modify it and rebuild the SFH.
    processors.wiki.ti.com/.../Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138
  • Hi 1898541,

    One or more questions are asked here. Let us go one by one.

    1. Rebuild of serial Flashing Utility.
    2. Executing the serial flashing utility and flash the program.

    1. Rebuild of serial Flashing Utility.
    ================================
    --> Follow this section in the TI WIKI and set up the build environment first for building this tool "AS-IS" .
    processors.wiki.ti.com/.../Rebuilding_the_Flash_and_Boot_Utils_Package

    --> Let us know if you are stuck with the build environment. Specify on which step you failed. post the screenshot too.

    --> If you succeed with the build, move to this step.
    Is it a custom board? of OMAPL137. If yes, do neccessary modifications for your custom board referring to this WIKI.
    processors.wiki.ti.com/.../Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138

    --> rebuild the tool.

    2. Executing the serial flashing utility and flash the program.
    ===================================================
    Once you succeed step one, will move on to step 2.
  • Thanks Titus/Shankari for a reply,

    Step 1 is complete and i am able to compile the whole thing. I get sfh_OMAPL137.exe at the end of make command. 

    ===========================================================================================

    I have updated the following :

    device.c


     status |= DEVICE_ExternalMemInit(0x0001C421, 0x0E9121C8, 0x78070004, 0x0000000F, FALSE);

    We are using SDRAM. Also these settings should not matter for erase i think. 

    UART.h

    #define DEVICE_UART_PERIPHNUM         (1)

    We are using uart1

    device_spi.h

    /***********************************************************
    * Global Macro Declarations *
    ***********************************************************/

    #define DEVICE_SPI_TIMEOUT (10240)
    #define DEVICE_SPI_DATOFFSET (0)

    #define DEVICE_SPIBOOT_PERIPHNUM (0)
    #define DEVICE_SPIBOOT_CSNUM (0)

    #define DEVICE_SPI_UBL_HDR_OFFSET (0*1024)
    #define DEVICE_SPI_APP_HDR_OFFSET (64*1024)

    As we are using spi0. I am a bit unsure on what DEVICE_SPI_DATOFFSET (0) would mean though.

    device_spi.c

    const SPI_MEM_ParamsObj DEVICE_SPI_MEM_params =
    {
    SPI_MEM_TYPE_FLASH,
    23, // addrWidth
    256, // pageSize
    4096, // sectorSize
    64*1024, // blockSize
    8*1024*1024 // memorySize
    };

    based on datasheet of 8MB flash

    device_async_mem.h

    Nothing changes, as i think this is for directly connected flash. Default is 8 bit which is true for my spi connected nand flash.

    Also I did not change those PLL settings as i understand the default should get me 96000 with my 20Mhz osc. I have set my terminal speed to 96k and do not want a change. 

    Apart from that (not something mentioned on the wiki) i had to change Baudrate in slh_ais.h

    MySP = new SerialPort(cmdParams.SerialPortName, 96000, Parity.None, 8, StopBits.One);

    ============================================================================================

    Now my issue has changed after i posted. My uart port was not set to 1 earlier. With that being set, the process moved forward and i was able to erase the flash

    C:\OMAP-L137_FlashAndBootUtils_2_40\OMAP-L137\GNU>sfh_OMAP-L137.exe -baud 96000 -p COM4 -erase

    Erasing flash
    100% [ ████████████████████████████████████████████████████████████ ]
    Erase complete


    Operation completed successfully.

    Then i tried burning my applications and ubls. That is where the verification got stuck.

    C:\OMAP-L137_FlashAndBootUtils_2_40\OMAP-L137\GNU>sfh_OMAP-L137.exe -baud 96000 -p COM4 -flash_dsp dsp-spi-ais.bin FtpBootMonitor.bin app.bin

    Flashing DSPUBL dsp-spi-ais.bin (7692 bytes) at 0x00000000

    100% [ ████████████████████████████████████████████████████████████ ]
    Image data transmitted over UART.

    100% [ ████████████████████████████████████████████████████████████ ]
    Verifying...

    cAborting program...
    ^C

    Now even the erase is not working. 

    Erasing flash
    100% [ ████████████████████████████████████████████████████████████ ]
    Verifying...

    ^C

    Any help would be appreciate. 

    Thanks, 

    AQ

  • Hi,

    On the customised serial flasher utility, not sure what was the default memory used.

    Try mentioning the "-flashType SPI_MEM" in the command.
  • Thanks Titus and Shankari, 

    Was able to solve the problem by changing the address width of the flash. My bad. 

    Thanks for the help. 

    On a separate note, i wanted to extend the functionality so that things are runtime configurable by passing in the arguments, instead of changing macros and compiling it.

    1. Do you see any limitation to that ?

    2. Any advice you may wanna give ?

    Thanks, 

    AQ