I. Comparison of MAX6ULL and STM32 startup methods

table of Contents

Preface

1. STM32 startup method

1. Starting method

2. The difference between ISP download and IAP download

2. I.MAX6ULL startup method

1. Startup method selection

2. Supported boot devices

3. Start device selection


Preface

I.MAX6U is a 528~900MHz MPU with Cortex-A7 core produced by NXP

1. STM32 startup method

1. Starting method

Anyone who has used the STM32 chip must know that the startup mode of the STM32 can be set by the BOOT0 and BOOT1 pins. These two pins can be connected to an external circuit to control the high and low levels, so that the STM32 microcontroller can be powered on. Start the way. As shown in the table below, the choice of startup mode.

BOOT0

BOOT1

Start mode

Description

0

X

User flash memory boot

That is FLASH start

1

0

System memory boot

For serial download

1

1

SRAM boot

Used to debug code in SRAM

The most used boot mode is the first flash boot, because in STM32, the program is generally only a few hundred K and not too big, and the microcontroller will integrate a few hundred K or even M FLASH, so it is generally directly from the internal FLASH started. After the one-chip computer is powered on, it starts directly from the address 0x8000000 of the main memory. As shown below (STM32 large-capacity product flash memory module organization)

2. The difference between ISP download and IAP download

For the second type of booting from the system memory, the small partner here may have questions. Why is it used for serial port download? How to realize serial port download? In fact, the reason is that STM32 has already solidified a bootloader in the system memory when it leaves the factory. When you choose to start from the system memory, the bootloader will start from the specified serial peripherals (different chips support different peripherals) , Refer to the link ) Download the receiving program to the main memory, and then jump to the main memory area to execute. This is the principle of ISP (In System Programming) in system programming . The boot program in ISP is solidified in System Flash, and we cannot change it. You can use FlyMcu software to download the program.

Speaking of serial port download, in fact, in addition to the ISP download method that comes with the system, it can also be downloaded through the principle of IAP (In Application Programing) . IAP is the user's own program to program some areas of User Flash during the running process, the purpose is to easily update the firmware program in the product through the reserved communication port after the product is released . To realize the serial port upgrade, a bootloader is also needed, but this bootloader is written by ourselves and stored in User Flash. The function of this boot program is to start in the user flash memory mode , before starting to execute the application program, first determine whether it is necessary to receive the program through the specified peripheral (this can be designed by yourself), if it is, it will receive and write to the application Program area, and finally jump to the application program to execute, so as to realize the function of serial port upgrade. For example, the ymodem protocol can be used, the upper computer is used as the ymodem host to use the hyper terminal to issue firmware, and the boot is used as the ymodem slave to receive the firmware. The following figure shows the distribution of ISP boot program, IAP boot program, and application writing program in Flash:

2. I.MAX6ULL startup method

1. Startup method selection

I.MAX6ULL supports multiple startup methods , and different startup methods have different startup requirements. Similar to the startup mode selection of STM32 microcontroller, the startup mode of I.MAX6ULL is selected through the BOOT_MODE0 and BOOT_MODE1 pins.

BOOT_MODE1

BOOT_MODE0

Start mode

Description

0

0

FUSE startup mode

That is FLASH start

0

1

Serial download

The program can be downloaded to an external storage device via USB or UART

1

0

Internal BOOT startup mode

Used to debug code in SRAM

1

1

Keep

 

Serial download:

Serial download means that the code can be downloaded to the external storage device on the board via USB or UART. We can use the USB port of OTG1 to download the code to the SD/EMMC, NAND and other storage devices on the development board. This download needs to use a software mfgtool provided by NXP , which is generally used to program the code into an external storage device during final mass production

Internal BOOT mode:

In this mode, the chip will execute the internal boot ROM code. This boot ROM code will initialize the hardware (part of the peripherals), and then transfer the code from the boot device (the device that stores the code, such as SD/EMMC, NAND) Copy it out and copy it to the specified RAM, usually DDR. What will this boot ROM code do? First of all, it must be the initialization clock. The system clock set by the boot ROM is shown in the figure:

When BOOT_MODE is set to internal BOOT mode, it can be booted from a variety of boot devices.

2. Supported boot devices

I.MAX6ULL also supports a variety of boot devices , such as booting from SD/EMMC, NAND Flash, QSPI Flash, etc. In STM32, the boot device is the internal FLASH, so there is no option to boot the device. But it is different in I.MAX6ULL. M is a common thing in the program. The cost of integrating several hundred megabytes of FLASH in the chip is very high, so it is generally chosen to place the program in an external storage device. Then copy the program to the link address (run address) to run, which not only reduces the cost and the difficulty of the manufacturing process, but also greatly increases flexibility. Users can choose storage devices to save costs. So which devices does I.MAX6ULL support to boot from? How is the boot device selected?

①, 16-bit NOR Flash on CS0 connected to EIM interface.

② OneNAND Flash on CS0 connected to EIM interface.

③ The page size of MLC/SLC NAND Flash NAND Flash connected to the GPMI interface supports 2KByte, 4KByte and 8KByte 8-bit wide.

④ 、 Quad SPI Flash。

⑤, SD/MMC/eSD/SDXC/eMMC and other equipment connected to the USDHC interface.

⑥ EEPROM with SPI interface

3. Start device selection

Similar to the startup method selection, it can also be controlled by pins, namely BOOT_CFG1[7:0], BOOT_CFG2[7:0], BOOT_CFG4[7:0] these 24 configuration IOs, which correspond to the 24 LCDs. Data lines LCD_DATA0~LCD_DATA23 . These 24 pins and BOOT_MODE1 and BOOT_MODE0 form the startup selection pin of I.MAX6ULL. But do all these 24 pins need to be used, otherwise, just use BOOT_CFG2[3], BOOT_CFG1[7:3]

Reference materials:

"Cortex M3 Definitive Guide (Chinese)"

"[Punctual Atom] i.MX6U Embedded Linux Driver Development Guide V1.3"

 

 

Guess you like

Origin blog.csdn.net/m0_37845735/article/details/105613268