2024-04-15 02:12 AM - edited 2024-04-15 02:12 AM
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.
Solved! Go to Solution.
2024-04-18 07:28 AM - edited 2024-04-18 07:44 AM
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.
To achieve higher frequency the XSPI2-HSLV must be "Checked" as mentioned in the readme.
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.
2024-04-15 08:48 AM - edited 2024-04-17 05:34 AM
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.
2024-04-15 01:15 PM
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.
2024-04-17 05:56 AM
Hi @bashira ,
Could you please check "MX25UW25645GXDI00" memory configuration.
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.
2024-04-17 08:38 AM
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.
2024-04-17 09:35 AM - edited 2024-04-17 10:04 AM
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)
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.
Thank you for the help.
2024-04-17 10:23 AM
@Malvi2024I just had a little debugging session and I found out that the invalid state is set at this point:
inside the HAL_XSPI_Read() function there is a XSPI_Command() followed by XSPI_Recieve(). The recieve function seems to timeout.
Here is my clock config.
Not sure, how to move forwards.
Thanks for the help guys.
2024-04-17 03:11 PM
I have the same board and encountered the same problem @bashira described.
Help would be massively appreciated.
2024-04-18 07:28 AM - edited 2024-04-18 07:44 AM
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.
To achieve higher frequency the XSPI2-HSLV must be "Checked" as mentioned in the readme.
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.
2024-04-18 07:47 AM
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 :)