Skip to main content
Visitor II
October 13, 2025
Question

FSBL + Application projects fail on STM32N6570-DK board

  • October 13, 2025
  • 5 replies
  • 615 views

Hello everyone,

I am working with the STM32N6570-DK discovery kit and I have encountered a strange behavior that I cannot explain.

When I use the ST-provided example projects that include both an FSBL (First Stage Boot Loader) and an Application image — for example:

  • Template_LRUN

  • Template_FSBL_XIP

  • JPEG_EncodingFromOSPI_DMA

they fail to run correctly on my STM32N6570-DK boards.
However, the exact same projects (same binaries, same flashing procedure) work perfectly on another identical STM32N6570-DK board (I was able to test the same projects on another STM32N6570-DK discovery kit provided by a friend).

Interestingly, simpler examples that only contain an FSBL project (for example GPIO_IOToggle) work fine on my board.

Before testing the ST-provided examples, I had tried to debug my own application on the same board.
During debugging, my code ended up in a HardFault error, and since then, it seems that any project which includes both an FSBL and an Application can no longer run properly on this board.

This makes me wonder whether something in the memory configuration might have been altered or locked after the crash — preventing the Application stage from being correctly loaded or executed.

I would like to understand what could cause this behavior and how to restore the board so that FSBL + Application projects can run again normally.

Any advice or diagnostic steps would be greatly appreciated.

Thank you in advance!

    This topic has been closed for replies.

    5 replies

    Technical Moderator
    October 13, 2025

    Hello @Pfaa, and welcome to ST community!

    Have you checked the BOOT0 and BOOT1 switches on your board? Since your board was able to run FSBL examples, it means developer mode is set with BOOT1 set to HIGH. Try setting both BOOT1 and BOOT0 to LOW to enable booting from FLASH.

    Best regards,

    PfaaAuthor
    Visitor II
    October 13, 2025

    Hello @STackPointer64, and thank you for your reply!

    So I tried to debug it and followed this tutorial: How to debug STM32N6 using STM32CubeIDE - STMicroelectronics Community and as I said it doesn't work with my board but with the other one it did. There I have BOOT1 set to high. Now I tried booting from FLASH with both switches set to LOW. But it did not work. I also used the Template_FSBL_XIP.

    Best regards,

    Technical Moderator
    October 13, 2025

    I see. Could you specify the error messages you see when trying to run the application? Also, during your latest successful debugging session, did you program any option bytes? To resolve this, try connecting to your board using STM32CubeProgrammer, select the OB tab from the left bar, click the arrow next to Read, and choose Reset MCU to factory settings.

    PfaaAuthor
    Visitor II
    October 13, 2025

    So when I debug it and let it run, I jump to the HardFault_Handler(). The Fault Analyzer looks like this:

    Pfaa_0-1760371494634.png

    Unfortunately under the OB tab I can not find the option Reset MCU to factory settings. It looks like this:

    Pfaa_1-1760371669692.png

    And as far as I know, I didn't program any option bytes, at least I didn't do it on purpose.

    Technical Moderator
    October 13, 2025

    Could you export your OTP configuration and attach it to the thread?

    1. Click on OTP in the menu on the left.
    2. Click Export below, save the file as text, and attach it here.

    Could you also answer the following questions?

    • When you ran the same application on the other identical board, was it in the same STM32CubeIDE working environment?
    • Have you made any changes to the debug/build configuration?
    • Have you followed the instructions in the README file to sign the application binary?
    PfaaAuthor
    Visitor II
    October 13, 2025

    I attached the OTP configuration to the thread.

    To your questions:

    • It was the same STM32CubeIDE working environment
    • I have not made any changes to the debug/build configuration
    • And I also followed the instructions in the README file to sign the application binary
    Technical Moderator
    October 16, 2025

    Hello @Pfaa,

    Thank you for your patience. That is unusual. Could you please attach the project that failed to execute and caused the hard fault? I understand it is the example provided by ST, but I am interested in any changes made to the environment by STM32CubeIDE. Debugging crashes may leave the debugger in an inconsistent state or corrupt the CubeIDE workspace metadata. Meanwhile, I suggest downloading a fresh firmware project and running it in a new workspace in CubeIDE.

    Best regards,

    ST Employee
    October 18, 2025

    Hello @Pfaa 

    There are no Option bytes on the STM32N6, only OTPs (One-Time Programmable bits). And I have checked the list of OTPs you sent, and it seems correct to me.

    I understand your issue is that on a single board, you cannot debug a project in DEV_BOOT (BOOT1=1) nor execute it in FlashBoot (from flash memory).

    Can you confirm the following points:

    1. In DEV_BOOT, after a reset, is LED2 (red) is on?

    2. Has this failing board worked in the past? What is its origin?
    3. Can you share both the version of your STM32N657-DK and the marking of the non-working STM32N6?

    Please find below the images you need to check:

    Best regards

    Romain

    Capture d’écran 2025-10-18 à 12.26.23.pngCapture d’écran 2025-10-18 à 12.26.56.png

    PfaaAuthor
    Visitor II
    November 4, 2025

    Hello @RomainR.,

    Sorry for the late reply. To answer your questions:

    1. Yes, in DEV_BOOT, after a reset, LED2 is on.

    2. Unfortunately I am not 100% sure if it was working correctly in the past.

    3. Images below

    IMG_1582.jpgIMG_1583.jpg

     

     

     

    Best regards