2025-04-01 12:43 AM - last edited on 2025-04-01 12:47 AM by Andrew Neil
Hi, @B.Montanari
We are working with the STM32N6570-DK EVK and developing an application that includes both a Bootloader and an Application. The application requires a contiguous 4MB+ memory block configured as a Heap.
We have followed your articles and example code from GitHub to get started. However, when we load the pre-built binaries available within the example to execute application from PSRAM, the Green LED does not blink. Upon investigation, we confirmed that the FSBL executes JumpToApplication, but the application itself seems to get stuck somewhere. Since we are using the external boot option, debugging is not possible.
Interestingly, when we build the same application using the LoadAndRun linker file, we can debug it, and in this case, we observe that the Green LED blinks as expected.
To verify that the FSBL is booting correctly in Flash mode, we added a blinking LED1 for 2 seconds, confirming that we do reach the Bootloader.
Could you provide insights into what might be causing this issue and how we can successfully execute the application from PSRAM? We have used the available project on a GitHub.
Thanks in advance!
2025-04-01 6:22 AM
Hi @Vishal95 ,
I just downloaded the binaries from the github and programmed them on my DK board, the application runs properly. Maybe you used the non-signed binaries? Just to make sure, please use the xyz-Trusted.bin ones when programming:
At address 0x70000000
At address 0x70100000
Let me know if you still have issues running the application with the binaries,
There is a way to debug, even when executing from external memories. I'm working on an article to guide this process.
Best Regards
2025-04-07 2:47 AM
Hi @B.Montanari,
We have used the exact Binary files suggested with links to program the kit at the suggested addresses. We’ve already tried flashing the board, but unfortunately, the Green LED does not blink.
Below, We have attached the Binaries downloaded from the links suggested by your and the flash log from the programming utility, which should help to confirm the binary sizes and the exact memory addresses where the binaries are being loaded.
We are looking for guidance on how to proceed. Our goal is to run the application from PSRAM. The application itself will be under 512KB, but we require a runtime memory allocation of at least 4MB for the Heap and 256KB for the Stack. From what I understand, this should be achievable using PSRAM.
We want to have the follows:
FSBL is loaded into AXISRAM_2
Application executes from PSRAM at address 0x90000000
We plan to place the Heap at 0x91000000, assuming this is a valid address within the PSRAM region
Could you please help us with the correct steps to get this working?
Thanks in advance!
2025-04-08 3:06 AM
Hi @Vishal95 ,
Not sure what might be wrong without a closer look or more debug info. Given my original project was made using the HAL driver 1.0.0, I've updated it to use the driver 1.1.0 and tested it again, it works as expected as well.
You can debug your FSBL and see what might be wrong, for example, check if the copy from the NOR to PSRAM is actually working. Here I'm added a breakpoint in the FSBL's function CopyApplication, you can see it copied the code from NOR to PSARM:
Just for reference, I'm uploading the update to 1.1.0 driver version as well. Since I've used the post script, mentioned in this article> How to add the STM32N6's header signature as post ... - STMicroelectronics Community, the binaries you should consider are:
..\FSBL_PSRAM\FSBL_PSRAM\STM32CubeIDE\FSBL\Debug: FSBL_PSRAM_FSBL-Trusted.bin
..\FSBL_PSRAM\FSBL_PSRAM\STM32CubeIDE\Appli\DebugFSBL_PSRAM_Appli-Trusted.bin
Hope this helps, but let me know if you still have any problems. If you do, can you check and/or update your OTP fuses related to the external memory? I've seen some users having problems to run at 50MHz without the proper adjustment. Here is the article detailing that> How to program the OTP fuse bits in the STM32N6 - STMicroelectronics Community
Hope this helps
Best Regards
2025-04-08 5:33 AM
Thansk for sharing your project, We have tried to build the project and Flash the Binaries. But still GREEN LED is not blinking as expected.
Following is the Snapshot of the OTP fush 124 which is responsible for the I/O segment used by XSPIM Port 1, Port 2.
By the post you have shared, stated that bit 15, 16 needs to be set in order to use XSPIM with higher Clock Speeds.
Still we are not able to run the code in PSRAM. Do you have any idea, Why this is not working. Or it seems like our Discovery kit was blown?
2025-04-09 7:58 AM
Any more debugging approach to resolve this issue. After setting the fuse 124 as suggested in the post shared by you we are still not getting LED blinking.
2025-04-09 8:12 AM
Hi @Vishal95 ,
Have you tried debugging the FSBL portion to ensure your copy from external NOR to PSRAM is working? The steps to do that are straightforward, program the two binaries using CubeProgrammer then using CubeIDE enter in debug mode using the FSBL project, that will be loaded in AXISRAM2 and you'll be able to monitor the copy process, same points as I've showed in the screenshots. That will help figuring out which step is not working for you. Remember to have the DK board in DEV mode for the entire process.
Unfortunately, I don't monitor the community that often, so please issue an OLS ticket for a more active support > https://ols.st.com/