Skip to main content
Visitor II
July 18, 2019
Question

STM32MP157C-DK2 flash didn't work.

  • July 18, 2019
  • 10 replies
  • 4549 views

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 topic has been closed for replies.

    10 replies

    RYinAuthor
    Visitor II
    July 18, 2019

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

    Technical Moderator
    July 18, 2019

    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) ?

    RYinAuthor
    Visitor II
    July 18, 2019

    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

    Technical Moderator
    July 18, 2019

    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

    RYinAuthor
    Visitor II
    July 19, 2019

    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!

    RYinAuthor
    Visitor II
    July 19, 2019

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

    Technical Moderator
    July 19, 2019

    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

    RYinAuthor
    Visitor II
    July 22, 2019

    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!

    RYinAuthor
    Visitor II
    July 22, 2019

    i mean succeeded

    RYinAuthor
    Visitor II
    July 25, 2019

    I changed the USB setting from "Full Speed" to "High Speed". It didn't help. It has the same problem.

    RYinAuthor
    Visitor II
    July 25, 2019

    but in Windows 10 with GUI CubeProgrammer it worked. in VM doesn't.

    Technical Moderator
    July 25, 2019

    Good to see it is working on W10.

    Please have a look to https://community.st.com/s/question/0D50X0000Az2Ct3SQE/how-do-i-load-openlinux-on-the-mp157

    It is likely related to your VM behavior/settings around USB connection (e.g. in VMWare, you could check in 'removable device', if the 'STMicroelectronics USB download..." is connected to the VM and not to W10 host) .

    Visitor II
    September 4, 2019

    I have exactly the same problem.

    But it is solved when I add "-tm 20000".

    Graduate
    August 10, 2020

    I had similar issue as reported originally:

    RUNNING Program ...
     
     PartID: :0x03
     
     reconnecting the device ...

    For me the issue was solved by making sure that the VirtualBox guest has a USB-filter to re-claim the USB connection used. If this is not setup and the boot loader for some reason need to reconnect the device CubeProg in the VM guest will time out since it does not re-detect the USB-port of the MP1 device.

    Did play with "-tm" option at all.

    Explorer
    February 7, 2023

    It's so annoying!

    Equipment: Power supply 6A, native Ubuntu 22.04, USB Highspeed 480MBit/s

    USB port disappears everytime and do you know what?

    The board also, because I put it in the trash.

    Tried many times to build a different linux image.

    The only thing the board was good at: blinking a red LED, nice!