cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157AAB failed to boot from NOR QSPI (bare-metal)

Hello.

Can someone explain problem by this diagnostics:

----------------------------------------

bootfailed

S-00000001C040CFFE

NS-0000000000000000

°----------------------------------------

bootfailed

S-00000001C040CFFE

NS-0000000000000000

№----------------------------------------

My board say these lines to PA13 pin (9600-8N1) after power up.

Flash memory contain [may be] properly formed first stage bootloader file with only infinite loop at starting point.

Binary in attachment.

1 ACCEPTED SOLUTION

Accepted Solutions

Load address is ALWAYS 0x2FFC2400 for FSBL, whatever you put in the header (it is ignored for FSBL).

Entry point in the header could be anywhere after the header (i.e. 0x2FFC2500) and the end of the SYSRAM

I recommend to compile your FSBL SW to fit with a region starting from 0x2FFC2500 (with a size of max 247KB minus 256 for header).

Entry point will depend on your SW startup.s construction, it is not always at the very first address.

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.

View solution in original post

17 REPLIES 17
PatrickF
ST Employee

See https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview#Debug_and_Error_messages

(I also send you a message)

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.
PatrickF
ST Employee

some thinks to look for:

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.

Yes, QSPI connected right (if I erase memory or corrupt STM2 signature, I can connect trough serial boot)

No, I not use DDR in my "bootloader" - just infinite loop

No, I use own flash programming tool - in this case Altera's USB byte blaster, CubeProgrammer can not do anything (looks like expecting SD card or something like).

Yes, you can examine my binary by downloading form 1-st message in this topic.

Manual say:

Traces can be downloaded from address range 0x2ffc1c00-0x2ffc2404

But, area from 0x2ffc2400 declared as used for bootloader. Should I move my code?

Can someone place here compiled "DK2 uboot SPL" - I can flashing this file and connect trough.... Serial port? What pins/speed?

PatrickF
ST Employee

seems your binary has wrong size declared somewhere (maybe in the header) as if I try to flash it on the Serial-NOR of an STM32MP157C-EV1 board, I get

Message from Embedded Flash Loader : fsbl1: Bad size requested for partition 1 = 0x4000000 <> 0x40000

As the FSBL is loaded in SYSRAM, size is limited to 0x2ffc2400 to 0x2fffffff, so must always fit into a (fixed size) partition of 0x40000

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.

Size form 2ffc2400 to end of this region is 247 KB - it is 0x3DC00‬, not 0x40000. I use seriously less size:

Image Type   : ST Microelectronics STM32 V1.0
Image Size   : 46832 bytes
Image Load   : 0x2ffc2400
Entry Point  : 0x2ffc2400
Checksum     : 0x004f969d
Option     : 0x00000001
Version    : 0x00000001

Image Type  : ST Microelectronics STM32 V1.0

Image Size  : 46832 bytes

Image Load  : 0x2ffc2400

Entry Point : 0x2ffc2400

Checksum    : 0x004f969d

Option    : 0x00000001

Version   : 0x00000001‬

Can you form right image header for this sample file?

Loading address and entry point - same value 0x2ffc2400

PatrickF
ST Employee

Your binary sound well formed.

Note that there is a typo in the wiki (not so important), you should read : Traces can be downloaded from address range 0x2ffc1c00-0x2ffc23ff

Could you explain the following sentence you wrote "Yes, QSPI connected right (if I erase memory or corrupt STM2 signature, I can connect trough serial boot)"

This mean your binary is loaded and started, right ?

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.