cancel
Showing results for 
Search instead for 
Did you mean: 

Crash when boot from nor.

uouox
Associate II

When I try to boot from NOR flash, it always crash.

The console has the log like this.

INFO:  PMIC version = 0x21

INFO:  Reset reason (0x15):

INFO:   Power-on Reset (rst_por)

INFO:  FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000

INFO:  FCONF: Reading firmware configuration information for: stm32mp_io

INFO:  Using QSPI NOR

INFO:   Instance 1

INFO:  Boot used partition fsbl1

NOTICE: BL2: v2.6-stm32mp1-r2.0(debug):()

NOTICE: BL2: Built : 07:26:18, Dec 11 2022

WARNING: Error in spi_mem_support

WARNING: Failed to read image id=12 (-45)

WARNING: loading of FWU-Metadata failed, using Bkup-FWU-Metadata

WARNING: Error in spi_mem_support

WARNING: Failed to read image id=13 (-45)

ERROR:  loading of Bkup-FWU-Metadata failed

PANIC at PC : 0x2ffea2eb

Exception mode=0x00000016 at: 0x2ffea2eb

Where is the wrong config?

4 REPLIES 4
PatrickF
ST Employee

Hi @uouox​ 

Maybe your Flashlayout was missing the metadata partitions when your programmed your NOR-Flash.

Please have a look to https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout#Typical_flashlayout-tsv_file

Regards,

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
uouox
Associate II

I have written the meta partition like the one from the flashlayout doc.

tsv like htis

#Opt Id Name Type IP Offset Binary

- 0x01 fsbl-boot Binary none 0x0 debug-tf-a-stm32mp157a-mp12-mx-usb.stm32

- 0x03 fip-boot FIP none 0x0 fip.bin

PD 0x04 fsbl1 Binary nor0 0x00000000 debug-tf-a-stm32mp157a-mp12-mx-nor.stm32

PD 0x05 fsbl2 Binary nor0 0x00040000 debug-tf-a-stm32mp157a-mp12-mx-nor.stm32

PD 0x06 metadata1 Binary nor0 0x00080000 metadata.bin

PD 0x07 metadata2 Binary nor0 0x000C0000 metadata.bin

PD 0x08 fip-a FIP nor0 0x00100000 fip.bin

PED 0x09 fip-b FIP nor0 0x00500000 none

PED 0x0A u-boot-env Binary nor0 0x00900000 none

PE 0x0B unused Binary nor0 0x00980000 none

uouox
Associate II

Finally figured out the problem.

The NOR platform setting code in plat_get_nor_data() does not honor the data bus width setting the DTS file.

HI @uouox​ 

could you please elaborate on the issue/solution ?

Which data bus width are you using/expecting (I assume it is 4-data).

Do you think it is a bug in our TF-A delivery ?

If relevant, could you share the fix ?

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.