cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to flash FSBL and Application to external flash via USB on STM32N6570-DK

Gowri_M
Associate II

Hi,

I am using the STM32N6570-DK development kit and I want to flash my FSBL and Application firmware into external flash using USB.

Currently, I am able to flash the firmware using ST-LINK, but I want to perform flashing through USB as well.

I configured the boot pins as mentioned in the datasheet:

  • BOOT0 = High
  • BOOT1 = Low

image.png

Current behavior

  • The device is detected in STM32CubeProgrammer when connected via USB.
  • USB connection is successful.
  • Partitions such as FSBL, RSSE_FW, RSSE_BLOB, RSSE_PLUGIN, etc., are visible.
  • However, the Download / Erasing & Programming option is disabled.

    image (1).png

    Questions

    1. Is flashing external flash through USB supported on STM32N6570-DK?
    2. Do I need to configure any OTP boot source or BOOTROM settings to enable USB flashing?

    Any guidance or examples on how to enable external flash programming via USB would be very helpful.


    Thank you.

4 REPLIES 4
FBL
ST Employee

Hi @Gowri_M 

FSBL must be programmed first:

  1. Power on into serial BootROM via USB DFU, program the intermediate FSBL, and jump to it.
  2. The FSBL configures the USB DFU interface and external sNOR memory, then the host sends the complete code via USB DFU to FSBL, which writes it to external NOR flash.
  3. After POR, the system boots from external NOR, loads the FSBL into RAM, and executes the application firmware.

Check the following example firmware.

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.




Best regards,
FBL

Hi @FBL 

Thank you for the response.

I went through the example firmware you mentioned and tried to implement the same approach. I followed the example structure and updated the TSV file. I did not add any additional OpenBootloader implementation in my project, similar to the example. I only updated the TSV file for my application.

However, I am not sure if my approach is correct or aligned with the intended workflow in the example.

The files below were copied directly from the example and placed in my working directory:

  • OpenBootloader_STM32N6570-DK-trusted.stm32
  • MX66UW1G45G_STM32N6570-DK-OBL.bin

Updated TSV file (FSBL + Application)

#Opt	Id	Name	Type	IP	Offset	Binary
P	0x1	fsbl-openbl	Binary	none	0x0	OpenBootloader_STM32N6570-DK-trusted.stm32
P	0x3	fsbl-extfl	Binary	none	0x0	MX66UW1G45G_STM32N6570-DK-OBL.bin
P	0x4	fsbl-extflash	Binary	nor0	0x0000000	my_app_FSBL.bin
P	0x4	fsbl-app	Binary	nor0	0x0100000	my_app_Appli.bin


In this case, I am not able to flash, and STM32CubeProgrammer shows an error:

Screenshot 2026-03-30 150544.png

 

Attempt 2: Flashing individually

I then tried flashing FSBL and Application separately by modifying the TSV file.

TSV for FSBL

#Opt	Id	Name	Type	IP	Offset	Binary
P	0x1	fsbl-openbl	Binary	none	0x0	OpenBootloader_STM32N6570-DK-trusted.stm32
P	0x3	fsbl-extfl	Binary	none	0x0	MX66UW1G45G_STM32N6570-DK-OBL.bin
P	0x4	fsbl-extflash	Binary	nor0	0x0000000	my_app_FSBL.bin

TSV for Application

#Opt	Id	Name	Type	IP	Offset	Binary
P	0x1	fsbl-openbl	Binary	none	0x0	OpenBootloader_STM32N6570-DK-trusted.stm32
P	0x3	fsbl-extfl	Binary	none	0x0	MX66UW1G45G_STM32N6570-DK-OBL.bin
P	0x4	fsbl-app	Binary	nor0	0x0100000	my_app_Appli.bin

In this case:

  • Flashing was successful
  • But after power-on reset, the program did not execute

I also tried flashing only FSBL, and it flashed successfully, but it still did not execute.

 

My Requirement

Previously, I was using STM32U5G7 in our project.

  • USB was used for firmware upgrade and initial flashing
  • No ST-LINK/J-LINK was exposed in the final product

Now I am using STM32N6570-DK, and I want the same behavior:

  • Only USB interface exposed
  • No ST-LINK in the final product
  • Flash FSBL and Application via USB

 

Questions

  1. In this use case, what all should be added or updated in my FSBL?
  2. Do I need to integrate OpenBootloader inside my FSBL project for USB flashing?


Thanks!

 

Saket_Om
ST Employee

Hello @Gowri_M 


@Gowri_M wrote:

Questions

  1. Is flashing external flash through USB supported on STM32N6570-DK?
  2. Do I need to configure any OTP boot source or BOOTROM settings to enable USB flashing?

Yes, the external flash programming over USB is supported by STM32CubeProgrammer. For the required configuration, please refer to the second method described in the article below:

How to connect the STM32N6 using STLINK and serial... - STMicroelectronics Community

 

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.
Saket_Om

Hi @Gowri_M 

As explained in readme, the example shared uses BootROM, OpenBootloader and External Loader to program NOR flash.
For your final product, the FSBL must include the USB capability if you want field updates without ST-LINK.
The OpenBootloader itself does not need to be unchanged, but your FSBL must provide equivalent USB flashing support and external flash access.
After provisioning, the board must boot from external NOR mode for the FSBL/application to run.

Create a file called FlashLayout.tsv and write this content in it
#Opt Id Name Type IP Offset Binary
P 0x1 fsbl-openbl Binary none 0x0 OpenBootloader_STM32N6570-DK-trusted.stm32

When the External Loader is programmed in RAM by STM32CubeProgrammer through TSV file. You find it here.

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.




Best regards,
FBL