RT1172 boot from FlexSPI2 fail

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

RT1172 boot from FlexSPI2 fail

741 Views
JasonGong
Contributor I

I developed my project on our PCB which has not UART/USB, so I can not use NXP tools to flash data. After building the boot image, I flashed the image to SPI flash(connects to FlexSPI2). To test if my boot image can work, I resets the MCU and then attached to debugger(I use LauterBach) to see if MCU has jump to application. I found CPU always runs to 0x223104(The address is in BootROM and it is an endless loop).  I guess this is boot fail and bootROM runs to endless loop.

Please give me help on this issue. Thanks!

After attached debugger, read data as below:

1. BMOD = 2 and BOOT_CFG3[3] = 1, this means boot from FlexSPI2

2. FlexSPI2 is configured with flash configuration data(I will list the data below)

3. Data in SPI flash(my SPI flash is Infineon's S28HL512T): FDCB(Flash configuration) at offset 0x400, IVT at 0x1000, BD at 0x1020 and Application at 0x2000

4. I can dump data with 0x60000000 directly, this means the data in flash can be read with AHB.

5. Configuration data in source code and SPI flash as below:

JasonGong_0-1658565825367.jpegJasonGong_1-1658565837226.png

 

 

0 Kudos
5 Replies

713 Views
jay_heng
NXP Employee
NXP Employee

There are two pin group options of FlexSPI2 PortA, which one you use?

Capture.PNG

0 Kudos

710 Views
JasonGong
Contributor I

Hello Jay, 

    I used flash PINs as below in red frame. And I can confirm BootROM has write flash configurations to FlexSPI2 such as Flash size, LUT etc via debugger Lauterbach. If I read data in SPI flash via debugger via AHB bus(dump the data from 0x60000000), the data can be read correctly. 

According to data read by debugger, I guess states below:

1. BootROM detects the right TAG "FCFB" --> Because I can see wrong TAG in FlexSPI2 Rx memory if I write a wrong TAG such as "FCDB"

2. BootROM has sent the request to read 512 bytes in SPI flash --> Because I can see  the starting address of flash configuration(0x400) in IPCR0 and size(0x200) in IPCR1. But I am not sure if all data read successfully because I can not find the data in RAM(OCRAM1 used by BootROM, 0x20240000 - 2024BFFF)

Please give me help about the issue. I can investigate more info if your need. Thanks!

 

JasonGong_0-1658714889355.png

 

 

0 Kudos

736 Views
Masmiseim
Senior Contributor I

Hello JasonGong,

You are writing: “BOOT_CFG3[3] = 1, this means boot from FlexSPI2”

Is this a spelling error? You need to set BOOT_CFG2[3] to one to boot from flexSPI2.

 

How is the bootstrap pin GPIO_DISP_B2_05 configured on your board? This can overwrite the settings from the fuses.

What is your configuration for BOOT_CFG2[2:0] (-->GPIO_DISP_B2_02, GPIO_DISP_B2_03, GPIO_DISP_B2_04). I think this should be set to 0 (pull down on the bootstraps) for your flash

Do you use FlexSPI2 A or B?

 

Regards

0 Kudos

722 Views
JasonGong
Contributor I

Hello Masmiseim, 

    Thanks for your reply!

    Yes, this is a mistake, it should be BOOT_CFG2[3], NOT BOOT_CFG3[3].

    I only set BMOD pin to 2, and BOOT_CFG2[3] pin to 1. Other boot pins are set to 0. And there was no Efuse updated. 

0 Kudos

719 Views
JasonGong
Contributor I

I use FlexSPI2 A.

0 Kudos