cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1 boot fail in TF-A

tam.nguyen
Associate

Hi all,

We design the custom board use ST32MP157 base on the design of STM32MP157-DK2 kit. We use the SD card for booting. The image and device tree is custom base on example of STM32MP157-DK2 kit. The board has a issue when booting via SD card. This is the booting log

NOTICE: CPU: STM32MP157DAA Rev.Z
NOTICE: Model: STMicroelectronics custom STM32CubeMX board - openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23
ERROR: nvmem node board_id not foundINFO: 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 SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.6-stm32mp1-r2.0(debug):()
NOTICE: BL2: Built : 09:44:59, Jun 13 2023
WARNING: Failed to access image id=3 (-2)
ERROR: Unable to find a metadata partition
WARNING: Failed to set reference to image id=12 (-2)
WARNING: loading of FWU-Metadata failed, using Bkup-FWU-Metadata
WARNING: Failed to access image id=3 (-2)
ERROR: Unable to find a metadata partition
WARNING: Failed to set reference to image id=13 (-2)
ERROR: loading of Bkup-FWU-Metadata failed
PANIC at PC : 0x2ffea21b

Exception mode=0x00000016 at: 0x2ffea21b

This is SD card node in dts file 

&sdmmc1{
pinctrl-names = "default";
pinctrl-0 = <&sdmmc1_pins_mx>;
status = "okay";
 
/* USER CODE BEGIN sdmmc1 */
disable-wp;
st,neg-edge;
bus-width = <4>;
/* USER CODE END sdmmc1 */
};

The schematic and power of SDcard are showed in the attached picture. 

Please give me the advise for this case.

Thank and best regards 

 

 

1 REPLY 1
PatrickF
ST Employee

Hi @tam.nguyen 

I assume you programmed your SD-Card offline (e.g. on a PC using https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command)
For me, as the FSBL is correctly loaded by BootROM, but fail later when going to load other partitions (metadata, FIP, etc..), the issue is probably not presumably at HW.

Could you share the TSV file used ?
It should be similar to : https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout#SD_card

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.