i.MX51 Boot Process

本文讨论了i.MX51处理器从NAND闪存启动的问题,包括配置设置、常见故障排查步骤及解决方案。文章详细介绍了如何通过设置特定寄存器来选择启动设备。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://forums.freescale.com/t5/i-MX-Microprocessors/i-MX51-Boot-Process/m-p/53735

 

http://news.emcelettronica.com/re-imx51-boot-process-2

 

Re: i.MX51 Boot Process?

freescale's picture

navanee,

 

Your statement that the mx51  "will try to boot from the devices in the following order, NOR, oneNAND, NAND, MMC, SPI/I2C, EEPROM" isn't really correct. That is the order the devices are listed in the flow chart, but there is no "sequencing" of the devices and they could have been listed in any order in the chart.  The determination of which external device to boot from is made entirely by the setting of BT_MEM_CTL and BT_MEM_TYPE. 

 

If you are trying to boot from NAND you should be setting (pert table 2-2 of the Security Reference Manual):

  BOOT_MODE[1:0] = 00                  [to enable boot from external device]

  BT_MEM_CTL[1:0] = 01     [for NAND]

 BT_MEM_TYPE[1:0] =   [set per table below based on the number of address cycles your NAND device requires]

    00 3 address cycles

    01 4 address cycles

    10 5 address cycles

    11 reserved

Similar entries

  • We also signed NDA & got the document.

     

    In my opinion, section 9.4.3 of the Reference Manual is correct. It will try to run the internal boot if BMOD =00 or 01. If there is no valid image in the selected memory (NAND / WEIM), it will jump to the serial downloader.

     

    There is a high level boot sequence (flow chart) in chapter 2.10 of the SRM. It says that imx51 will try to boot from the devices in the following order, NOR, oneNAND, NAND, MMC, SPI/I2C, EEPROM. If it is not able to boot from the above mentioned devices, it shall jump to serial downloader.

     

    That is what exactly happening to our system. I am tring to boot from NAND. I made the boot switches as per the RM. It is not booting. Then i connected the ATK Tool Kit. It is connecting.

     

    Is this the boot image problem or some setting of signals like BT_MEM_CTL? This needs to be checked out.

     

    Anyway Thanks for reply...!

     

     

  • navanee,

     

    It turns out that because there are a lot of security features wrapped around boot Freescale has chosen to move the detailed description of the boot process into the "Security Reference Manual" document, which requires an NDA to obtain.

     

    Chapter 2 of the Security Reference Manual is basically the same as Chapter 9 of the Reference Manual, but with a huge number of missing details fleshed out (including a very clear flowchart of the precise boot decision tree).

     

    Unfortunately the Security Reference Manual is "Confidential Proprietary" so I'm bound by the NDA to not reproduce sections here, even though I strongly believe that there is a fair bit of material there which belongs in Chapter 9 of the Reference Manual.  I recommend you execute an NDA with Freescale and get a copy. What I can  safely clarify is that in "normal" (i.e. non-secure) use the process of booting to an external memory device by setting BMOD=0 and using BT_MEM_CTL/BT_MEM_TYPE to select the boot device functions as one would hope (i.e. the processor determines the external boot memory device, fetches code from it, and begins executing that code; the internal ROM is not involved and can indeed be blank, and apparently is  blank as shipped). 

     

    For me section 9.4.3 of the Reference Manual was confusing, because it says that the serial downloader will run if "

    BMOD[1:0] = 00 or 10 (internal or internal boot with fuses) and there is not a valid image in the Flash device".  I believe that should  read " BMOD[1:0] = 00 or 10 ( external or internal boot with fuses) and there is not a valid image in the selected boot device".  So yes, if you set BMOD=00 and use BT_MEM_CTL/BT_MEM_TYPE to select, say, NAND, then the MX51 will try to boot from NAND and if it doesn't find a valid image in NAND then it will invoke the serial downloader.

     

    For the specifics of how the MX51 decides that a code image is invalid you will have to refer to the Security Reference Manual (though again I personally believe that information belongs in the Reference Manual).

     

    Best of luck to you!

     

     

  • Hi Eric,

     

    Thanks for reply.

    We set all the settings as per the reference menual as well as SRM. But the device did not boot from NAND...!

     

    We are setting the following settings.

     

    1.1.   BT_MEM_CTL[1:0] = 01 for boot from NANDFlash (Switch 7 - OFF, switch 8 ON)
    1.2.   BT_PAGE_SIZE[1:0] according to
          -   01 2 K bytes (R382 not mounted and R383mounted)
    1.3.   In case of 4Kbyte page size NAND Flash configure BT_SPARE_SIZEaccording to:
         -   0 for 128 bytes spare (Samsung) (R388 mounted)

    1.4.   BT_BUS_WIDTH[1:0] according to:
        -   00 for 8-bit; (R384 not mounted)

    1.5.   BT_MEM_TYPE[1:0] according to (Switch 4 - OFF, switch 5- ON)
        -   01 4 address cycles

    1.6.   BT_MLC_SEL
        -   0 SLC NAND device (R386 not mounted)

    1.7.   GPIO_BT_SEL =0 for efuse override (Verified by reading the fuse settings)
    1.8.   Internal Boot mode - BMODE[0:1]=00 (Switch 1 & 2 - OFF)

     

    Still it is not working...!

     

    We are thinking of changing the NAND chip itself...!

     

     

  • We are using the imx51 babbage board with external NAND (numonyx NAND01GR3B2C - 8 bit 2k page NAND) connected.

     

    We have configured the Boot settings as follows.

     

    1.1.   BT_MEM_CTL[1:0] = 01 for boot from NAND Flash (Switch 7 - OFF, switch 8 ON)
    1.2.   BT_PAGE_SIZE[1:0] according to
          -   01 2 K bytes (R382 not mounted and R383 mounted)
    1.3.   In case of 4Kbyte page size NAND Flash configure BT_SPARE_SIZE according to:
         -   0 for 128 bytes spare (Samsung) (R388 mounted)

    1.4.   BT_BUS_WIDTH[1:0] according to:
        -   00 for 8-bit; (R384 not mounted)

    1.5.   BT_MEM_TYPE[1:0] according to (Switch 4 - OFF, switch 5 - ON)
        -   01 4 address cycles

    1.6.   BT_MLC_SEL
        -   0 SLC NAND device (R386 not mounted)

     

    1.7.   GPIO_BT_SEL =0 for efuse override (We dont know how to set this?)

     

    1.8.   Internal Boot mode - BMODE[0:1]=00 (Switch 1 & 2 - OFF

     

    We are using the u-boot version 2009.08.

    To boot from NAND, we have define the following macros in the u-boot-2009.08/include/configs/mx51_bbg.h

    #undef CONFIG_SKIP_RELOCATE_UBOOT
    #define CONFIG_SYS_NAND_BOOT    1

    #define CONFIG_CMD_NAND
    #define CONFIG_MXC_NAND
    #define CONFIG_CMD_ENV
    #define CMD_SAVEENV     

    /*-----------------------------------------------------------------------
     * NAND FLASH driver setup
     */
    #define NAND_MAX_CHIPS         8
    #define CONFIG_SYS_MAX_NAND_DEVICE    1
    #define CONFIG_SYS_NAND_BASE          0x40000000
    #define CONFIG_NAND_FW_16BIT    0 /* 1: 16bit 0: 8bit */

    /* Monitor at beginning of flash */
    #define CONFIG_FSL_ENV_IN_NAND

    And we have compiled the u-boot and written to NAND flash at the offset 0x0.
    Except booting from NAND, all other NAND operations like erase, read write to NAND flash is working fine.
    Even, mounting the filesystem from NAND is also works fine.

     

    Is this correct?

     

    We are not able to boot the u-boot from NAND.

     

     

    Thanks in advance.

  • Hello All,

     Its look like the address cycle from the Boot ROM is different than what the NAND Flash address cycle. In boot switch I configured as 4 address cycle, but according to the boot ROM is sending 5 address cycles. Is the boot switch settings will override the boot ROM settings?

     

     -AJ

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值