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.

SPI boot mode

Other Parts Discussed in Thread: AM3517

I would like to clarify about the SPI boot mode on AM3517.

1) In SPI boot mode, which peripheral module is assuming to utilize ?

2) Is there any recommended SPI flash devices to be applied to SPI boot mode ?

3) Is there any specific restriction on the SPI boot mode ?

Thanks and Best Regards,

KIMIZUKA

  • 1) In SPI boot mode, which peripheral module is assuming to utilize ?

     SPI boot is available via MCSPI1

    2) Is there any recommended SPI flash devices to be applied to SPI boot mode ?

     I'm not aware of any at this time.

    3) Is there any specific restriction on the SPI boot mode ?

    SPI boot mode is only available from silicon revision 1.1  (samples available for ordering)

    • Only 24 bit addressable flashes are supported
    • Only flash sizes between 128KBytes and 16 MBytes are supported
    • Only Mode 3 flashes are supported (Phase = 1, Polarity = 1)
    • The SPI flash must be connected to CS0
    • Only 4 pin mode is supported (spi_clk, spi_cs0, spi_somi, spi_simo)
    • SPI clock frequency is 12 MHz

    More details can be fount in the section 24.4.7.8 of the Technical Reference Manual http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprugr0b&fileType=pdf

       Paul

  • Dear staff,

    Now, I'm trying to boot x-loader from SPI flash device (m25p32), which already set the sys_boot to b11100 (sys_boot[5] = 0), but it's not work. Then I try to find out and I got the keyword "SPI boot mode is only available from silicon revision 1.1".  So, I try to print value of CONTROL_IDCODE, which I got "0x1b86802f".

    My question is ..

    1) Am I using silicon revision 1?

    2) For this CPU, I could not boot from SPI device ?

    3) Could you please show me an example of the value of CONTROL_IDCODE, in case of it is revision 1.1 or higher ?

    Sorry, this may be an easy question but I really want to confirm my understanding.

     

    Pongdith Ruenrerng

     

  • It looks like you have a ES1.1 (designated by the 0x1B86802f).  Have you probed the SPI signals to see if you are getting proper clock and data?

    Regards,

    James

  • Dear staff,

    About SPI signals, I haven't probed yet but I quite sure that my SPI Flash device could be used well. Because I could boot x-loader(MLO) from MMC(FAT) mode and access SPI Flash device via u-boot. My understanding, booting process is the ROM-Code's duty which checks sys_boot[5:0] value and then load/execute the Image from the location that sys_boot are configured. That's mean developer could not do anything to set or control the SPI interface at booting time.

    So, I thought, the problem that I could not boot from SPI device may come from a couple point...

    1. This CPU could not boot from SPI device. (That's why I asked about silicon version and mentioned to CONTROL_IDCODE's value).
    2. Data in SPI Flash memory not match with CPU booting specification. ( sprugr0b.pdf: AM35x ARM Technical Reference Manual, section 24.4.7.8, page 2734 )
      • As the Reference Manual mentioned: SPI boot data only need 2 words of data for simple image header, first word for size of image and second word for destination location for loaded Image. So, I checked MLO binary, which's generated from signGP and already pre-padded with same data as well (destination load address is now set to 0x40200800 as default of signGP). So I tried as follow ..
        • Boot Kernel from MMC
        • Write MLO into SPI flash with command "busybox flashcp -v /media/mmcblk0p1/mlo /dev/mtd0".
        • Confirm data in flash with command "busybox hexdump /dev/mtd0", which same with original MLO.
        • Turn off the board and configure sys_boot[5:0] to b011100 and then turn on the board again, but nothing printed out to the terminal as it should be.

     

    Did I do something wrong? Could you please suggest me more?

     

    Bast Regards,

    Pongdith Ruenrerng

  • caring...

    sector size of m25p32 is 64kbytes. 

    In 24.4.7.8 SPI Flash,It said that The ROM code assumes one sector is 512 bytes. maybe this is reason,but i am not sure.

    can you use a SPI flash that have a sector size of 512bytes?

    look for you reply..

     

     

     

  • Dear Mr.Zhanghua Fan,

     

    Thank you very much for your suggestion. 

    I really missed this part, I would contact with hardware team to try another chip.

     

    Best Regards,

    Pongdith Ruenrerng

  • Dear Staff,

     

    I've consulted with hardware team already, but they quite not sure about the device.

    So, I think, someone here might know or ever used this kind of chip.

     

    Could someone please show me some examples of the chip that has 512 byte of sector size ?

     

    Best Regards,

    Pongdith Ruenrerng

  • Hi,Ruenrerng 

          Do you have any evolvement in spi flash boot?

           Please make sure

            1. there are spi signals on SPI1 pins when boot from spi flash at the startup time.In my project,there are no signals on SPI1 pins,very bad news.

            2.when you flash the SPI memory, you swap the endianess of the image - ARM is little endian, but the SPI protocol is big endian.

    Best Regards.

  • Dear Mr.Zhanghua Fan,

    YOU SAVED MY LIFE !!

    It was ENDIAN problem. Thank you very very much !!

    Best Regards,

    Pongdith Ruenrerng

  • NOT AT ALL

    IT IS Madan's advice.

    I think we should thank her for  helping us.

    Best Regards