MX7SABRE Boot Config Settings

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MX7SABRE Boot Config Settings

1,374 Views
thomasschaefer
Contributor III

Hi,

I want to boot our i.MX7 SABRE board from the onboard QSPI flash. I managed to activate the flash by reworking resistors as described in the QSPI NOR Flash section of the schematics. When booting via Serial Downloader, I can load and write bootloader binary image into QSPI flash.

However, the board does not boot from the QSPI device. I have removed the supplied SD card containing original u-boot and set BOOT_MODE switch SW3 to [10] (internal boot) and boot config switch SW2 to [10000000] as shown in schematics and printing on the board. It is only possible to load u-boot via serial download mode.

Even more, if SD card is attached, the board only boots from SD card, it is not possible to boot from serial downloader or QSPI flash. This is independent from Boot Config (SW2) and BOOT_MODE (SW3) settings with the exception that the board won't boot anymore if BOOT_MODE is set to [11] (Test Mode), but that's OK I think.

What can I do to manage booting from QSPI flash?

Best regards,

Thomas

Labels (2)
0 Kudos
4 Replies

840 Views
thomasschaefer
Contributor III

Finally I've learned that booting from QSPI requires a set of configuration parameters (see chapter 6.6.6.3 of the RM) stored in the flash device from offset 0x0 on (the RM Rev 0.1 states that configuration parameters are stored at offset 0x400, but this is wrong as here is the location for the bootloader binary image).

The MFGTOOL contains the configuration parameters for different QSPI devices and with that I was able to create a 512 byte binary blob and write it into the QSPI device at offset 0x0. Now I can boot the MX7SABRE from QSPI flash with bootloader stored at offset 0x400.

These are my steps to create the configuration parameter binary blob (qspi-header.sh and qspi-nor-macronix-mx25l51245g-config are from the MFGTOOL package):

# Create QSPI header ASCII file (qspi-tmp)

# sh qspi-header.sh qspi-nor-macronix-mx25l51245g-config

#

# Create QSPI configuration header binary blob

# cat qspi-tmp | xxd -r >qspi-header.bin

0 Kudos

840 Views
thomasschaefer
Contributor III

Looking further into this I found the description of the SD/MMC Manufacture Mode:

SD_MMC_ManufactureBootFlow.PNG

At least, I understand now why serial downloader is overridden when BOOT_MODE is set to 01b - the SDMMC MFG mode is not disabled on our board. Will try to find out why internal boot (BOOT_MODE = 10b) from QSPI fails now.

Thomas

0 Kudos

840 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Thomas

>>set BOOT_MODE switch SW3 to [10] (internal boot) and boot config switch SW2 to [10000000] 

Your settings are correct.

>>See page 9 of schematic with PDF format

pastedImage_1.png

Some resistors should also be adjusted on MX7Sabre Board!

Have a nice day!

Weidong

0 Kudos

840 Views
thomasschaefer
Contributor III

Hi Weidong,

thank you for your comments. As I said above, we already did the resistor adjustments (OK, we could not locate R398 on the PCB, but QSPIA_SS1_B is not used so I think this has no effect). Otherwise, we would not be able to read and write the QSPI flash.

There must be another problem with boot configuration settings. We have a second i.MX7 SABRE board here with no resistor modifications. I understand that fuses are burnt to boot from SD card, but when SW3 is switched to [01]  (serial download mode) the board still boots from SD card plugged in. It is not possible to boot via serial download mode then. Serial download mode will only work when SD card is removed from the slot.

I believe this is a mistake because it is not possible to boot the board in case that a broken bootloader is stored in the boot device that cannot be remove, e.g. a QSPI flash.

Can you explain what happens here?

Best regards,

Thomas

0 Kudos