1. Startup method selection
The BOOT process occurs after the I.MX6U chip is powered on. The chip will select the BOOT mode according to the setting of BOOT_MODE[1:0]. The value of BOOT_MODE[1:0] can be changed in two ways, one is to rewrite eFUSE (fuse), and the other is to modify the corresponding GPIO high and low levels. The first method of modifying eFUSE can only be modified once, and it cannot be modified again, so we do not use it. We use the method of selecting the boot mode by modifying the GPIO high and low levels corresponding to BOOT_MODE[1:0]. All development boards use this method. I.MX6U has a BOOT_MODE1 pin and a BOOT_MODE0 pin. These two pins correspond to BOOT_MODE[1:0]. The schematic diagram of these two pins of the I.MX6U-ALPHA development board is shown in the figure
BOOT_MODE1 and BOOT_MODE0 have 100KΩ pull-down resistors inside the chip, so the default value is 0. We also connected the two pins of BOOT_MODE1 and BOOT_MODE0 to the dip switches on the baseboard, so that we can control the high and low levels of BOOT_MODE1 and BOOT_MODE0 through the dip switches. Taking BOOT_MODE1 as an example, when we turn the first switch of BOOT_CFG to "ON", it is equivalent to the BOOT_MODE1 pin being connected to the 3.3V power supply through the 10K resistor R88. The BOOT_MODE1 inside the chip is also grounded by a 100K pull-down resistor. Therefore, the voltage of BOOT_MODE1 at this time is 100/(10+100)*3.3V= 3V, which is a high level. Therefore, when the 8 switches in BOOT_CFG are turned to "ON", it is a high level, and when they are turned to "OFF", it is a low level.
The I.MX6U has four BOOT modes, which are controlled by BOOT_MODE[1:0], that is, the two IOs BOOT_MODE1 and BOOT_MODE0. The BOOT mode configuration is shown in the table:
①.Serial download
When BOOT_MODE1 is 0 and BOOT_MODE0 is 1, this mode is enabled. Serial download means that the code can be downloaded to the external storage device on the board through USB or UART. We can use the USB port OTG1 to download the code to the SD/EMMC, NAND and other storage devices on the development board. We need to turn BOOT_MODE1 to "OFF" and turn BOOT_MODE0 to "ON". This download requires a software provided by NXP, which is generally used to burn the code to the external storage device in the final mass production.
②. Internal BOOT mode
This mode is enabled when BOOT_MODE1 is 1 and BOOT_MODE0 is 0. In this mode, the chip will execute the internal boot ROM code. This boot ROM code will perform hardware initialization (part of the peripherals), and then copy the code from the boot device (the device where the code is stored, such as SD/EMMC, NAND) to the specified RAM, usually DDR.
2. BOOT ROM initialization content
When we set the BOOT mode to "internal BOOT mode", the boot ROM code inside the I.MX6U will be executed. What will this boot ROM code do? First of all, it must initialize the clock. The system clock set by the boot ROM is shown in the figure.
BT_FREQ mode is 0. You can see that the boot ROM will set the core clock of I.MX6U to 396MHz, that is, the main frequency is 396Mhz. System PLL=528Mhz, USB PLL=480MHz, AHB=132MHz, IPG=66MHz.
The internal boot ROM will turn on the MMU and Cache to speed up execution. The L1 ICache will be turned on when downloading the image, and the L1 DCache, L2 Cache and MMU will be turned on when verifying the image. Once the image verification is completed, the boot ROM will turn off the L1 DCache, L2 Cache and MMU.
The interrupt vector offset will be set to the start position of the boot ROM. When the boot ROM starts the user code, the interrupt vector offset can be reset. Generally, it is reset to the start of our user code.
3. Select the boot device
When BOOT_MODE is set to internal BOOT mode, you can boot from the following devices:
①. 16-bit NOR Flash connected to CS0 of EIM interface.
②. OneNAND Flash connected to CS0 of EIM interface.
③. MLC/SLC NAND Flash connected to the GPMI interface. NAND Flash page size supports 2KByte, 4KByte and 8KByte, 8-bit width.
④. Quad SPI Flash.
⑤. SD/MMC/eSD/SDXC/eMMC and other devices connected to the USDHC interface.
⑥. EEPROM with SPI interface.
How to select these boot devices? I.MX6U also provides two configuration methods: eFUSE and GPIO. eFUSE will not be explained here. We will focus on how to select the boot device through GPIO, because all I.MX6U development boards configure the boot device through GPIO. Just as the boot mode is selected by BOOT_MODE[1:0], the boot device is configured through 24 configuration IOs, BOOT_CFG1[7:0], BOOT_CFG2[7:0], and BOOT_CFG4[7:0]. These 24 configuration IOs just correspond to the 24 data lines of the LCD, LCD_DATA0~LCDDATA23. After the boot is completed, these 24 IOs can be used as the data lines of the LCD. These 24 lines and BOOT_MODE1 and BOOT_MODE0 together constitute the boot selection pins of I.MX6U, as shown in the figure.
Although there are 24 IOs, only a few IOs need to be adjusted. All other IOs can be pulled down to ground, that is, set to 0. Open the core board schematic of the I.MX6U-ALPHA development board, the default settings of these 24 IOs are shown in the figure
Most of the IOs are grounded, only a few are connected high, especially the 8 IOs BOOT_CFG4[7:0] are pulled down to ground by 10K resistors, so we don’t need to pay attention to BOOT_CFG4[7:0]. The only 16 IOs we need to focus on are BOOT_CFG2[7:0] and BOOT_CFG1[7:0]. The meaning of these 16 configuration IOs is posted on the left side of the schematic, as shown in the figure
Open the baseboard schematic of the I.MX6U-ALPHA development board. The schematic diagram of the boot device selection dip switch on the baseboard is shown in the figure
In addition to BOOT_MODE1 and BOOT_MODE0, LCD_DATA3~LCDDATA7, LCD_DATA11 and other 6 IOs are also brought out. The corresponding high and low levels can be set by the dip switch. When the dip switch is turned to "ON", it is 1, and when it is turned to "OFF", it is 0. Among them, LCD_DATA11 is BOOT_CFG2[3], LCD_DATA3~LCD_DATA7 are BOOT_CFG1[3]~BOOT_CFG1[7]. The configuration meaning of these 6 IOs is shown in the table.
BOOT IO meaning, when the I.MX6U-ALPHA development board boots from SD card, EMMC, NAND, the settings of the DIP switches are as shown in the table
Previous article:Detailed explanation of i.MX6ULL image burning and boot header file of ARM (IMX6U) bare metal on Linux
Next article:Linux ARM (IMX6U) bare metal assembly LED driver experiment-burn bin file to SD card to run
Recommended ReadingLatest update time:2024-11-24 17:12
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- EEWORLD University Hall----Design of electric vehicle simulation engine sound system
- How to make a jumper between the pads of two different plug-ins in PCB?
- Locating DSP illegal interrupts
- How to complete a waveform analyzer based on 51 single chip microcomputer
- Of these four levels of PCB engineers, what level have you reached?
- Please tell me the role of these two resistors in the circuit
- Mobile Phone RF Design Skills
- I feel like I can't stay in this stupid company any longer.
- [Help] About TMS320F206
- Thank you for your strong faith