Skip to main content
Explorer
July 16, 2025
Solved

STM32MP257F-DK Starter Package Boot Issue (Fails at Sector[0] on Partition 0x3)

  • July 16, 2025
  • 2 replies
  • 750 views

Hello all,

 

I am following the following guide: https://wiki.stmicroelectronics.cn/stm32mpu/wiki/STM32MP25_Discovery_kits_-_Starter_Package In order to bring up a STM32MP257F-DK board and am running into a problem when I try to use the Programmer to flash the board. It gets to Partition 0x3 and at 31% fails saying it failed to download sector[0]. Specifically this is the output in the terminal:

-------------------------------------------------------------------
STM32CubeProgrammer v2.20.0
-------------------------------------------------------------------

 

USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x505, @Revision ID /0x2000
SN : 003700494236501700363847
DFU protocol: 1.1
Board : --
Device ID : 0x0505
Device name : STM32MP23xx/25xx
Device type : MPU
Revision ID : --
Device CPU : Cortex-A35

Start Embedded Flashing service

 

Opening and parsing file: tf-a-stm32mp257f-dk-optee-programmer-usb.stm32


Memory Programming ...
File : tf-a-stm32mp257f-dk-optee-programmer-usb.stm32
Size : 202.95 KB
Partition ID : 0x01

Download in Progress:
[==================================================] 100%

File download complete
Time elapsed during download operation: 00:00:07.388

RUNNING Program ...
PartID: :0x01

Reconnecting the device ...

USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU @Device ID /0x505, @Revision ID /0x0011, @Name /STM32MP257FAK Rev.Y,
SN : 003700494236501700363847
DFU protocol: 1.1
Board : --
Device ID : 0x0505
Device name : STM32MP257FAK Rev.Y
Device type : MPU
Device CPU : Cortex-A35
Start operation done successfully at partition 0x01


Opening and parsing file: fip-stm32mp257f-dk-ddr-optee-programmer-usb.bin


Memory Programming ...
File : fip-stm32mp257f-dk-ddr-optee-programmer-usb.bin
Size : 33.67 KB
Partition ID : 0x02

Download in Progress:
[==================================================] 100%

File download complete
Time elapsed during download operation: 00:00:01.050

RUNNING Program ...
PartID: :0x02

Reconnecting the device ...

USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU @Device ID /0x505, @Revision ID /0x0011, @Name /STM32MP257FAK Rev.Y,
SN : 003700494236501700363847
DFU protocol: 1.1
Board : --
Device ID : 0x0505
Device name : STM32MP257FAK Rev.Y
Device type : MPU
Device CPU : Cortex-A35
Start operation done successfully at partition 0x02


Opening and parsing file: fip-stm32mp257f-dk-optee-programmer-usb.bin


Memory Programming ...
File : fip-stm32mp257f-dk-optee-programmer-usb.bin
Size : 2.99 MB
Partition ID : 0x03

Download in Progress:
[=============== ] 30%

Error: failed to download Sector[0]
Error: failed to download the File
Error: Download partition 0x03 failed
Error: TSV flashing service failed

 

I am unsure how to fix this and any help would be greatly appreciated. Thanks!

    This topic has been closed for replies.
    Best answer by Carson

    Hi @Gregory PLANCHON & @PatrickF

     

    I figured out the problem, it seems that the USB port I was connected to, on the front of my PC was a 3.0 USB which apparently doesn't work and I needed to connect it to a USB port on the back of my computer. I can flash it now! Thank you both for your help.

    2 replies

    ST Employee
    July 17, 2025

    Hi @Carson ,

     

    I've done the test myself and haven't encountered  any problems, but could you please check these points:

    • Have you done the prerequisites mentioned in chapter 5?
    • Are you connected to your board in Cube Programmer?
    • Are you in Starter-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/images/stm32mp2?

    If all of the above is correct, could you please try running the script mentioned in part 6.3?

     

    Regards,

    Grégory

    CarsonAuthor
    Explorer
    July 17, 2025

    Hi @Gregory PLANCHON,

     

    After going through again it still gives me the same error, below are some more specifics on each of your bullets:

     

    On the prerequisites, I have done all the steps it mentions about installing and setting up the programmer tool and I have setup the USB for serial flashing. It doesn't mention in that chapter any other prerequisites so I assume that is good. I also did some of the prerequisites under the PC prerequisites tab although it seems those are only for Distribution and Developer packages and not the Starter Package.

     

    On the connected to cube programmer, I have tried flashing in the GUI and in the Terminal, and if I connect in the GUI then try to flash in the terminal it doesn't work saying target device not found. Either way the Programmer seems to work.

     

    On the directory, specifically my directory when I try to flash is /Desktop/STM32MPU-Ecosystem-v6.1.0/Starter-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/images/stm32mp2. I assume that's fine, or does my Starter package need to be in my home directory?

     

    When I try to run the script mentioned I get the following out: 

    dd: fsync failed for 'standard output': Invalid argument
    640+0 records in
    640+0 records out
    5368709120 bytes (5.4 GB, 5.0 GiB) copied, 48.676 s, 110 MB/s

    So I don't think it worked unfortunately.

     

    NOTE: One thing I have to differently from the guide is in section 6.1 when downloading the image. In the guide it says to run:

    tar xvf en.FLASH-stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.tar.gz

    However this command does not work for me it has a problem with the tar command and saying it doesn't see the file as a tar file. so instead I have to run:

    gunzip FLASH-stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.tar.gz
    tar xvf FLASH-stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.tar

    I didn't think this would cause a problem but maybe it is, I'm unsure.

     

    Thanks,

    Carson

    Graduate
    November 1, 2025

    I face similar problem and after connecting to the back panel of PC it magically worked!