cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-H7S3L8 Booting to Application via Bootloader

bashira
Associate II

Hi all,

I have a Nucelo-H7S3L8 board running the demo application. The project has 2 applications (boot, and application). The boot is supposed to jump to the application, which is located in the external MX25UM25645GXDI00 memory.

 

However when debugging the boot application the BOOT_Application() function returns "BOOT_ERROR_MAPPEDMODEFAIL". My configuration for the MX25UM25645GXDI00 is attached to this post.

Any hints or guidance will be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @bashira@Malvi2024 and @atosun ,

Thank you for this clarification.

Could you please try to use the STM32CubeProgrammer to check the value of XSPI2-HSLV option byte.

KDJEM1_0-1713450368684.png

To achieve higher frequency the XSPI2-HSLV must be "Checked" as mentioned in the readme.

KDJEM1_1-1713451422582.png

Please let me know if the issue is solved or not.

Thank you for your contribution.

Kaouthar

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

9 REPLIES 9
KDJEM.1
ST Employee

Hello @bashira and welcome to the Community 🙂,

May Template_XIP example can help you.

For that, I advise you to take a look at this example and get inspired from the .ioc file and the readme.

I hope this help you.

Thank you.

Kaouthar

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.

bashira
Associate II

Hi Kaouthar,

Thanks for your replay.


I have had a chance to match my settings in the ioc file with the "Template_XIP" ioc settings. Unfortunately, I have had no luck with my problem. I am debugging the external memory with the  "ExtMem_manager" application but no luck.

KDJEM.1
ST Employee

Hi @bashira ,

Could you please check "MX25UW25645GXDI00" memory configuration.

KDJEM1_0-1713358092778.png

Are you able to run this example Template_XIP ?

Note that, this project is targeted to run on STM32H7S3xx device on NUCLEO-H7S3L8 board from STMicroelectronics. 

This project runs from the external Flash memory. It is launched from a first boot stage and inherits from this boot project configuration (caches, MPU regions [regions 0 and 1], system clock at 600 MHz and external memory interface at the highest speed). Note that the boot part is automatically downloaded from the IDE environment via the board project Templates/Template_XIP/Binary/Boot_XIP.hex file.

Thank you.

Kaouthar

 

 

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.

Malvi2024
Associate

I must say that I have found the same problem with Template_XIP.
Debugging boot project, the function BOOT_Application() fails with BOOT_ERROR_MAPPEDMODEFAIL.
I have seen that this comes from HAL_XSPI_Command() making some checks, then setting hxspi->ErrorCode = HAL_XSPI_ERROR_INVALID_SEQUENCE and returning HAL_ERROR.
Additionally I have also tried to replace hxspi2.Init.MemorySize = HAL_XSPI_SIZE_32GB with HAL_XSPI_SIZE_256MB (256Mbits), but no luck.

I can confirm this @Malvi2024 

The function in question is:
HAL_StatusTypeDef HAL_XSPI_Command(XSPI_HandleTypeDef *hxspi, XSPI_RegularCmdTypeDef *const pCmd, uint32_t Timeout)

bashira_0-1713371185724.png

The state gets set to 512 somehow. I have not had time to debug this further, but I know that state is NOT valid after the init function MX_EXTMEM_MANAGER_Init()

 

@KDJEM.1I just made a new project for the Nucleo-H7S3L8 board. Below is how everything is configured. I have not changed anything.

bashira_1-1713371474961.png

 

bashira_2-1713371499879.png



bashira_3-1713371518134.png


Thank you for the help.

@Malvi2024I just had a little debugging session and I found out that the invalid state is set at this point:

bashira_0-1713374217606.png

inside the HAL_XSPI_Read() function there is a XSPI_Command() followed by XSPI_Recieve(). The recieve function seems to timeout.

bashira_1-1713374374378.png

 

Here is my clock config.

bashira_2-1713374515285.png

 

bashira_3-1713374548460.png


Not sure, how to move forwards.

Thanks for the help guys.

 

atosun
Associate

I have the same board and encountered the same problem @bashira described.

 

Help would be massively appreciated.

KDJEM.1
ST Employee

Hello @bashira@Malvi2024 and @atosun ,

Thank you for this clarification.

Could you please try to use the STM32CubeProgrammer to check the value of XSPI2-HSLV option byte.

KDJEM1_0-1713450368684.png

To achieve higher frequency the XSPI2-HSLV must be "Checked" as mentioned in the readme.

KDJEM1_1-1713451422582.png

Please let me know if the issue is solved or not.

Thank you for your contribution.

Kaouthar

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.

Hi Kaouthar,

That definitely seemed to have solved the problem for me. I will do some intensive testing later on.

Thank you very much for the help 🙂