Skip to main content
LFlic
Visitor II
May 15, 2019
Question

STM32MP157C-DK2 disconnects during flashing an is unable to reconnect. Alpha HW?

  • May 15, 2019
  • 4 replies
  • 3983 views

When trying to flash OpenSTLinux on the STM32MP157C-DK2 the flashing procedure gets halted with the following error message.

16:01:00 : STM32CubeProgrammer API v2.1.0
16:01:01 : USB speed : High Speed (480MBit/s)
16:01:01 : Manuf. ID : STMicroelectronics
16:01:01 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
16:01:01 : SN : 000000000000
16:01:01 : FW version : 0x011a
16:01:01 : Device ID : 0x0500
16:01:19 : Read TSV File: C:\Users\Ludwig\Downloads\en.FLASH-stm32mp1-openstlinux-4.19-thud-mp1-19-02-20\stm32mp1-openstlinux-4.19-thud-mp1-19-02-20\images\stm32mp1\flashlayout_st-image-weston\FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
16:01:19 : Number of partitions: 9
16:01:40 : Start Embedded Flashing service
16:01:40 : Memory Programming ...
16:01:40 : Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32
16:01:40 : File : tf-a-stm32mp157c-dk2-trusted.stm32
16:01:40 : Size : 245360 Bytes
16:01:40 : Partition ID : 0x01
16:01:40 : Download in Progress:
16:01:40 : File download complete
16:01:40 : Time elapsed during download operation: 00:00:00.630
16:01:40 : RUNNING Program ...
16:01:40 : PartID: :0x01
16:01:41 : Start operation done successfully at partition 0x01
16:01:41 : Flashlayout Programming ...
16:01:41 : Running Flashlayout Partition ...
16:01:41 : Flashlayout partition started successfully
16:01:41 : Memory Programming ...
16:01:41 : Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32
16:01:41 : File : u-boot-stm32mp157c-dk2-trusted.stm32
16:01:41 : Size : 748660 Bytes
16:01:41 : Partition ID : 0x03
16:01:41 : Download in Progress:
16:01:42 : File download complete
16:01:42 : Time elapsed during download operation: 00:00:01.138
16:01:42 : RUNNING Program ...
16:01:42 : PartID: :0x03
16:01:42 : reconnecting the device ...
16:02:12 : Error: unable to reconnect the target device: time out expired
16:02:12 : Error: Start operation failed at partition 0x03
16:02:12 : Error: TSV flashing service failed
16:02:12 : Warning: Connection to device 0x500 is lost

While researching, I stumbled over this particular thread: https://community.st.com/s/question/0D50X0000AgE1buSQC/cant-flash-sd-card-on-stm32mp157xev1-process-stops . This guy had a similar problem as I do. My MB1272 is also green instead of blue like on all the images I saw. This device was provided to me as a part of an urgent project, but I can't seem to get it working. Please provide a solution for me, so I can start working. Thanks to anyone in advance!

This topic has been closed for replies.

4 replies

PatrickF
Technical Moderator
May 28, 2019

Sent a Private Message to you. Note that most Alpha HW are not supported by official delivery.

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.NEW ! Sidekick STM32 AI agent, see here
Sergey1
Associate II
November 13, 2019

I have the same issue as above with STM32MP157C-DK2.

My log is below:

12:03:28 : STM32CubeProgrammer API v2.2.0

12:03:35 : USB speed : High Speed (480MBit/s)

12:03:35 : Manuf. ID : STMicroelectronics

12:03:35 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

12:03:35 : SN : 0046003E3338510634383330

12:03:35 : FW version : 0x0110

12:03:35 : Device ID : 0x0500

12:03:41 : Read TSV File: D:\Projects\Tag\stm32MP1\stm32mp1-openstlinux\images\stm32mp1\flashlayout_st-image-weston\FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

12:03:41 : Number of partitions: 9

12:03:59 : Start Embedded Flashing service

12:03:59 : Memory Programming ...

12:03:59 : Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32

12:03:59 : File : tf-a-stm32mp157c-dk2-trusted.stm32

12:03:59 : Size : 245364 Bytes

12:03:59 : Partition ID : 0x01 

12:03:59 : Download in Progress:

12:04:00 : File download complete

12:04:00 : Time elapsed during download operation: 00:00:00.534

12:04:00 : RUNNING Program ... 

12:04:00 : PartID: :0x01 

12:04:00 : Start operation done successfully at partition 0x01

12:04:00 : Flashlayout Programming ...

12:04:00 : Running Flashlayout Partition ...

12:04:00 : Flashlayout partition started successfully

12:04:00 : Memory Programming ...

12:04:00 : Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32

12:04:00 : File : u-boot-stm32mp157c-dk2-trusted.stm32

12:04:00 : Size : 805514 Bytes

12:04:00 : Partition ID : 0x03 

12:04:00 : Download in Progress:

12:04:01 : File download complete

12:04:01 : Time elapsed during download operation: 00:00:00.992

12:04:01 : RUNNING Program ... 

12:04:01 : PartID: :0x03 

12:04:01 : reconnecting the device ...

12:04:31 : Error: unable to reconnect the target device: time out expired

12:04:31 : Error: Start operation failed at partition 0x03

12:04:31 : Error: TSV flashing service failed

12:04:31 : Warning: Connection to device 0x500 is lost

12:04:32 : Disconnected from device.

PatrickF
Technical Moderator
November 14, 2019

please provide a log of the console output (VCP over ST-Link USB micro-B connector)

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.NEW ! Sidekick STM32 AI agent, see here
Sergey1
Associate II
November 14, 2019

When I installed driver for VCP I was able to flash Linux image and it is working now.

But I have other issue.

I would like to flash and debug Cortex M4 but STMCubeProgrammer says "No stlink detected".

I have tried to install drivers "en.stsw-link009" but still the same.

but I see "ST-Link Debug" on Device Manager.

Thanks.

PatrickF
Technical Moderator
November 15, 2019

Code upload and development on Cortex-M4 is not done using STM32CubeProgrammer. You should use an IDE such as STM32CubeIDE or SW4STM32.

You have choice to debug Cortex-M4 with Linux up and running from Flash (called 'production mode') or in standalone (called 'Engineering mode')

See https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware

and https://wiki.st.com/stm32mpu/wiki/STM32-CoPro-MPU_plugin_for_SW4STM32 (SystemWorkbench is going to be deprecated, but you have details about Engineering mode use case)

See also https://wiki.st.com/stm32mpu/wiki/STM32CubeMP1_development_guidelines

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.NEW ! Sidekick STM32 AI agent, see here
Sergey1
Associate II
November 16, 2019

Thanks for answer.

I was able to debug M4 via VisualGDB but now I got other question.

Is it any way I can start M4 core and run firmware when power applied without starting A7 cores?

I saw that manual says that A7 should reset M4 and load it's binary to the memory first but

I like to double check.

We want to migrate from stm32 Cortex M3 mcu to MP1 but running Linux should be optional in our case

only when we need to do some heavy computations.

PatrickF
Technical Moderator
November 18, 2019

At cold boot, only A7 will start. As described, it is responsible to load M4 FW and start it. Then A7 could go in low power modes if no Linux required.

At low power exit (e.g. STANDBY), M4 could start from RETRAM code without any A7 action (which can then be woken up later by M4 FW when Linux procession is required).

In short, M4 cannot start from flash as MCUs.

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.NEW ! Sidekick STM32 AI agent, see here