cancel
Showing results for 
Search instead for 
Did you mean: 

Can't flash SD card on STM32MP157x-EV1, process stops

j_gil
Associate II

Hello everyone,

I'm trying to get started with the STM32MP157 with the STM32MP157x-EV1 Evaluation board by following the exact steps shown here.

Everything seems to be running smoothly but when I try to flash the microSD card on the board, something happens: Apparently the problem begins allright, but then, after the message saying "reconnecting the device..." nothing happens and the flashing stops.

Here's the log:

user@STest:~/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/images/stm32mp1$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-ev1-trusted.tsv 
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.0.0                  
      -------------------------------------------------------------------
 
 
 
USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN          : 000000000000
FW version  : 0x011a
Device ID   : 0x0500
Device name : STM32MPxxx
Device type : MPU
Device CPU  : Cortex-A7
 
 
Start Embedded Flashing service
 
 
 
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-ev1-trusted.stm32
  File          : tf-a-stm32mp157c-ev1-trusted.stm32
  Size          : 245360 Bytes
  Partition ID  : 0x01 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:00.654
 
RUNNING Program ... 
  PartID:      :0x01 
Start operation done successfully at partition 0x01
 
Flashlayout Programming ...
[==================================================] 100% 
Running Flashlayout Partition ...
Flashlayout partition started successfully
 
 
Memory Programming ...
Opening and parsing file: u-boot-stm32mp157c-ev1-trusted.stm32
  File          : u-boot-stm32mp157c-ev1-trusted.stm32
  Size          : 754169 Bytes
  Partition ID  : 0x03 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:01.143
 
RUNNING Program ... 
  PartID:      :0x03 
 
reconnecting the device ...
 
Error: unable to reconnect the target device: time out expired
 
 
Error: Start operation failed at partition 0x03
Error: TSV flashing service failed

Can anyone give me a hand on what may I be doing wrong?

22 REPLIES 22

Even when I try it with Windows, without virtual machine, it is the same. The DFU is not found until I press the reset button.

Could be linked to STLINK FW (version 2.33 provided with CubeProgrammer v2.2.0 has issue with uBoot).

Please try to update to v2.35 using the direct STLINK FW update (https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link007.html#get-software)

In order 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.

Still the same problem

Could you try adding "-tm 20000" to the command line, this allow more time for the PC to start the USB driver on uBoot reconnect.

Maybe utility like UsbTreeView (on Windows) could help you to find if the uBoot DFU is recognized or not.

When DFU is from BootROM, your should find something like in iProduct descriptor "DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000"

When DFU is from uBoot, is should be something like "USB download gadget@Device ID /0x500, @Revision ID /0x0000"

In order 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.

The DFU connection is lost, until I press reset at the board. Even when I wait minutes, it doesn't reconnect.

Could you precise which kind of Type-C supply you use ?

Could you please try another supply (even try with one of your PC USB port, usually ok for supply DK2 during Flashing) ?

In order 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.

I tried different cables with and without adapters on two PCs, but it doesn't work. The original setup is the only one, where I get no warning, that the current is too low.

The device isn't found, when it writes "Boot over usb0!" at the console of the mp1 board (over st-link connection)

Did you have the Blue Led ON (should be as uBoot is started) and no continuous Flash of Red Led ?

Could you try reinstalling Pc USB drivers (using \Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\DFU_Driver\STM32Bootloader.bat) ?

In order 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.

The Blue Led is ON and no continuous Flash of Red Led.

I reinstalled the PC USB driver for the DFU. It is still working for writing data to the board, but when it reboots, the connection is lost forever.

Hello,

I got another MP1 board and with that it is working fine. So I tested it again with the "old" hardware and another SD card and now it works too. Seems to be a problem with the SD card I used.

Thanks for your help!