1.7k views
in Platform Packages by
I'm getting problem on flashing image on stm32mp157c-dk2

please any can solve this issue.

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.6.0                  
      -------------------------------------------------------------------

USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN          : 0034001A3438510438333630
FW version  : 0x0110
Device ID   : 0x0500
Device name : STM32MP1
Device type : MPU
Device CPU  : Cortex-A7

Start Embedded Flashing service

Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2-serialboot.stm32
  File          : tf-a-stm32mp157c-dk2-serialboot.stm32
  Size          : 237896 Bytes
  Partition ID  : 0x01

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

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

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-dk2-trusted.stm32
  File          : u-boot-stm32mp157c-dk2-trusted.stm32
  Size          : 904820 Bytes
  Partition ID  : 0x03

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

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

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

 Thanks.

2 Answers

0 votes
by

Hello,

difficult to say what is going wrong... Just a few things that you can try:

  • Please make sure to have a good power supply connected - I got similar problems during the flashing when I just used power via PC.
  • You can try to use the STM32CubeProgrammer CLI under Windows.

Does this help?

Best regards,

Manfred.

by

Many months later I was again fighting with the same issue - it was the poor power supply.

So if someone get "Error: Unable to reconnect the target device" when trying to download the image on SDCard via STM32CubeProgrammer (IDE or CLI), please try again with a really good power supply.

0 votes
by
I encountered the same problem and was helped both by online.support@st.com and internet searches. The download process requires a re-enumeration of the usb port ("gadget" gets added to the name string part way through the download) and this is not supported by default in virtual box. You have to download the "Virtual Box Extension Pack" for your version of Virtual box to get the re-enumeration support. A good "how to" for that install can be found here:

https://www.linuxbabe.com/virtualbox/access-usb-from-virtualbox-guest-os

Note that even after you install this pack the download will still fail the first time, but it does seem to fix the problem.

Good Luck!

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...