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.

How to flash M25P128 SPI flash

Other Parts Discussed in Thread: OMAPL138

Hi,

Here we are working with OMAPL138 Custom EVM board with 16MB SPI flash of numonyx with part number M25p128

We could not able to write uboot into spi flash.

steps followed

Converted uboot elf file into Uboot_uart.bin for UART2 mode using AIS gen tool

Gave proper settings for PLL0 PLL1 and DDR.

Could able to see u-boot > prompt on hyperterminal.

issued

> sf probe 0

got

16384 KiB M25p128 at 0:0

then issued

> sf erase 0 40000

erase succeded.

On sf write <ram address> 0 40000

sf write failed..

What could be the problem

FYI:

SPE  EVM board- SPI NOR = 128 sector, 256 page, 256 Byte / Page, 75MHz
Custom board - SPI NOR = 64 sector, 1024 page, 256 Byte / Page, 54MHz

 

  • The first place I would suggest you look at is the protocol, or algorithm, required to write to the SPI flash you are using on your board and compare that with the one on the EVM.

    If there are differences, then you would need to comprehend those differences in the code inside of uboot that handles the SPI writing.

  • Thanks for guiding the thread..!

    In which part of u boot source code we need to modify the Device id information of SPI flash.

    If this is done then we could able to solve things asap...

     

    Thanks

    Zaheer

  • After a few runs of grep in the u-boot source, I would say you should look at the ./drivers/mtd/spi/ directory.

  • we are using numonyx n25q128(correction).

    on uart u boot we could able to probe spi flash

    on issuing

    >sf probe 0

    it is taking our spi flash as m25p128 but actual is n25q128*

    sf read is working perfect but sf write is failing..

    where and what could be the problem.

     

     

    Thanks

  • Here we are following the way which the Calixto (Third party TI support) have used for their NAND flash (we are using their SOM):

    The problem is they are using NAND flash on SOM,
    We need both SPI flash as well as NAND flash for our application,
    So we used their SOM and added SPI flash to our Carrier board(application specific). So they do not have proper support for SPI flash as of now and they are also working on this to help us boot from SPI flash.

    We could able to boot from NAND flash using our custom board with their SOM using UART boot method which Calixto has asked us to folow.
    But finding difficult to follow the same method to flash from SPI flash as we are using different flash part number [Numonyx:N25Q128] whose support is not added in the DULG Uboot source (As in this method it is completely dependent on Uboot source).

    The following are the steps followed :

    Converted U-boot[elf] to uboot_uart.bin using AISgen D800k008.exe with proper DDR, PLL0 and PLL1 setting for UART2 boot mode.

    Transferred uboot_uart.bin to the Target using UART BOOT host.exe on [Boot mode:UART2].

    ON succeeding opened the hyperterminal and issued command (with minimal uboot_uart.bin residing in target RAM)

    > sf probe 0

    Mistook SPI flash as M25p128(since numonyx support is not added in the Uboot source code).

    >sf erase 0 10000

    Erase failed.

    later transfered the actual uboot for SPI flash via tftp

    when we issue
    >sf write 0xc0700000 0 10000

    it is getting failed.

    As we are following this method we are finding comfortable with this method of flashing.

    Can you help us resolve this issue.

    How to add SPI flash N25Q128 support to the Uboot source as well as read and write hex command/methodologies for this flash.

    Please kindly help us to resolve this. And also let us know if you have any patch for this flash.