cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157C-DK2 flash didn't work.

RYin
Associate II

I've tried to flash STM32MP157C-DK2 SDCard like described in ST wiki with command STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv.

and it didn't work! i got following error report. it seems it has trouble to reconnect the device. does anyone have an idea why it didn't work? or does anybody get similar problem? how do i get it working? Thanks a lot!

     -------------------------------------------------------------------

                       STM32CubeProgrammer v2.1.0                 

     -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

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

SN         : 0036004A3338510939303435

FW version : 0x0110

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-dk2-trusted.stm32

 File         : tf-a-stm32mp157c-dk2-trusted.stm32

 Size         : 245360 Bytes

 Partition ID : 0x01

Download in Progress:

[==================================================] 100%

File download complete

Time elapsed during download operation: 00:00:04.627

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         : 748660 Bytes

 Partition ID : 0x03

Download in Progress:

[==================================================] 100%

File download complete

Time elapsed during download operation: 00:00:13.495

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

This discussion is locked. Please start a new topic to ask your question.
15 REPLIES 15
RYin
Associate II

could that be an issue with power? i power it first not with 3A supply.

PatrickF
ST Employee

You are using an USB Full-Speed port (12Mbits/s), maybe this is the problem, could you try to add -tm 20000 to the CubeProgrammer command line ?

Could you also log the console output (available as VCP 115200 8 N 1 using ST-Link connector) ?

could you provide DK2 serial number (available on a white sticker on the backside of the PCB) ?

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

no! i tried it with -tm command. it didn't work. same result like before.

and console output is:

partittions : Writing GPT : success!

done

DFU alt info setting: done

crq -> brequest: 0x0

i believe DK2 serial number: DK32MP157C2$AU1

PatrickF
ST Employee

Maybe an issue with DFU driver (reconnect is using a different DFU descriptor), please have a look to https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer#Preparing_the_USB_serial_link_for_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.
NEW ! Sidekick STM32 AI agent, see here
RYin
Associate II

I've already done that! That doesn't help.

Hi! Patrick,

can this issue be power supply issue? because i still use a 2.1A supply and the LED is still red. is it that means that the device can not boot itself successfully? i order a 3A supply and hope it will work and besides can i boot the system and flash the image per other memory medium than SD card? i search the board documentation but no found SPI or QSPI memory medium, is it still other way or any other sample software i can follow? Thank you very much!

PatrickF
ST Employee

If you supply is stated 2.1A, I think this is not the root cause of your problem. The red toggling led is because the supply is not detected as a true 5V 3A USB Type-C supply.

I'm puzzled by the "Full Speed (12MBit/s)" message which mean your PC might have some strange set-up.

Btw, in the UART4 console message (Virtual Comm Port available when you connect the ST-Link cable), you should have much more messages than you copied above. Could you please log all in a file ?

Did you set the DK2 dip switches in the right position for Flash load ? see https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

Last solution, if you have a Linux PC (or a Virtual Machine running Ubuntu, see https://wiki.st.com/stm32mpu/wiki/PC_prerequisites), you could program the SD-Card outside DK2, directly on a PC using for example an USB->micro-SD adapter. see https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command

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

so i acceeded to create the image file with shell file and flashed it with SD adapter. It worked. but i still struggle how i can flash it with the hardware! for log message I'll get some more!

RYin
Associate II

i mean succeeded