Skip to main content
Visitor II
April 1, 2025
Question

STM32N6570-DK Example Code from Github (FSBL Boot modes) not working

  • April 1, 2025
  • 3 replies
  • 1748 views

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!

    This topic has been closed for replies.

    3 replies

    ST Employee
    April 1, 2025

    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

    STM32N6_FSBL_Modes/PSRAM/STM32CubeIDE/FSBL/Debug/FSBL-trusted.bin at main · stm32-hotspot/STM32N6_FSBL_Modes

    At address 0x70100000

    STM32N6_FSBL_Modes/PSRAM/STM32CubeIDE/Appli/Debug/Appli-trusted.bin at main · stm32-hotspot/STM32N6_FSBL_Modes

    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

    Vishal95Author
    Visitor II
    April 7, 2025

    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!

    Vishal95Author
    Visitor II
    April 8, 2025

    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.

    Vishal95_0-1744115270759.png

    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?

    Vishal95Author
    Visitor II
    April 9, 2025

    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.

    ST Employee
    April 9, 2025

    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/