Skip to main content
Visitor II
November 28, 2019
Solved

STM32MP157C-DK2 not getting populated.

  • November 28, 2019
  • 3 replies
  • 2848 views

I am trying to flash a 32gb sd card with stlinux for STM32MP157C-DK2 using the guide at https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

The SD card that came with the kit boot perfectly, I just want to flash another sd card.

I am using Ubuntu 16.04 LTS on my laptop

details about my STM32MP157C-DK2

Serial number(below pcb) : DK32MP157C2$AU1

These are the commands I ran and the output I got on console :

$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.2.0 
 -------------------------------------------------------------------
 
 
 
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 002900333338510939303435
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 : 245364 Bytes
 Partition ID : 0x01 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:00.666
 
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 : 805514 Bytes
 Partition ID : 0x03 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:00.989
 
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.
    Best answer by PatrickF

    If red led is blinking forever (and not 1 or 2 blink), this mean the USB Type-C supply is not recognized as enough power, and uBoot will stop. Maybe a good idea to test with another supply.

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

    Alternatively, you could flash the SD-Card on your Linux machine using DD (https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command)

    3 replies

    Technical Moderator
    November 28, 2019

    Maybe due to a bad STLINK FW (v2.33), Unfortunately, the one embedded in some version of CubeProgrammer was this bad one.

    Please use FW update with latest CubeProgrammer or directly use the very latest FW upgrade utility (recommended) here 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

    Visitor II
    November 29, 2019

    I updated the firmware using the tool, still the same result:-

     -------------------------------------------------------------------
     STM32CubeProgrammer v2.2.0 
     -------------------------------------------------------------------
     
     
     
    USB speed : High Speed (480MBit/s)
    Manuf. ID : STMicroelectronics
    Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
    SN : 002900333338510939303435
    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 : 245364 Bytes
     Partition ID : 0x01 
     
    Download in Progress:
    [==================================================] 100% 
     
    File download complete
    Time elapsed during download operation: 00:00:00.649
     
    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 : 805514 Bytes
     Partition ID : 0x03 
     
    Download in Progress:
    [==================================================] 100% 
     
    File download complete
    Time elapsed during download operation: 00:00:00.967
     
    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

    When the reconnecting to device is printed then the red led starts blinking and then it fails.

    Also when try to see the list of stlinks connected without putting the board in DFU mode the stlink is greyed out.

    ===== DFU Interface =====
     
    No STM32 device in DFU mode connected
     
    ===== STLink Interface =====
     
    -------- Connected ST-LINK Probes List --------
     
    ST-Link Probe 0 :
     ST-LINK SN : 066DFF353036465043221035
     ST-LINK FW : V2J33M0
    -----------------------------------------------
     
    ===== UART Interface =====
     
    Total number of serial ports available: 2
     
    Port: ttyACM0
    Location: /dev/ttyACM0
    Description: STM32 STLink
    Manufacturer: STMicroelectronics
     
    Port: ttyS4
    Location: /dev/ttyS4
    Description: N/A
    Manufacturer: N/A

    these lines ST-LINK SN : 066DFF353036465043221035

      ST-LINK FW : V2J33M0

    are greyed out, what does this mean?

    Please help me I have to finish a project and the deadline is near !

    Thanks in advance.

    Technical Moderator
    November 29, 2019

    Hello,

    you still have the STLink FW v2.33 which is faulty for STM32MP1 (stop uBoot if not connected to a VCP driver on the PC).

    Latest CubeProgrammer has still this v2.33 FW version.

    Please update to v2.35 using the direct STLINK FW update link already provided (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)

    Visitor II
    November 29, 2019

    Hi thanks for the quick response. I need help(I didn't work)

    I updated the firmware to  ST-LINK FW : V2J35M0 as you can see when I list the device:

    $ STM32_Programmer_CLI -l
     -------------------------------------------------------------------
     STM32CubeProgrammer v2.2.0 
     -------------------------------------------------------------------
     
    ===== DFU Interface =====
     
    Total number of available STM32 device in DFU mode: 1
     
     Device Index : USB1
     USB Bus Number : 001
     USB Address Number : 004
     Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
     Serial number : 002900333338510939303435
     Firmware version : 0x0110
     Device ID : 0x0500
     
    ===== STLink Interface =====
     
    -------- Connected ST-LINK Probes List --------
     
    ST-Link Probe 0 :
     ST-LINK SN : 066DFF353036465043221035
     ST-LINK FW : V2J35M0
    -----------------------------------------------
     
    ===== UART Interface =====
     
    Total number of serial ports available: 2
     
    Port: ttyACM0
    Location: /dev/ttyACM0
    Description: STM32 STLink
    Manufacturer: STMicroelectronics
     
    Port: ttyS4
    Location: /dev/ttyS4
    Description: N/A
    Manufacturer: N/A

    After this I again tried to flash the SD card :

    $ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
     -------------------------------------------------------------------
     STM32CubeProgrammer v2.2.0 
     -------------------------------------------------------------------
     
     
     
    USB speed : High Speed (480MBit/s)
    Manuf. ID : STMicroelectronics
    Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
    SN : 002900333338510939303435
    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 : 245364 Bytes
     Partition ID : 0x01 
     
    Download in Progress:
    [==================================================] 100% 
     
    File download complete
    Time elapsed during download operation: 00:00:00.677
     
    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 : 805514 Bytes
     Partition ID : 0x03 
     
    Download in Progress:
    [==================================================] 100% 
     
    File download complete
    Time elapsed during download operation: 00:00:00.969
     
    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

    Also at the last step when it tries to reconnect, The red led starts blinking continuously and the blue led turns on.

    I am using ubuntu 16.04 as specified in the wiki, I have followed all the steps.

    Technical Moderator
    November 29, 2019

    Yes it is a good idea to use GTK, you will find many help from the community and some basic samples applications developed by ST (GTK + Python) on the starter packages.

    see: https://wiki.st.com/stm32mpu/wiki/GTK_demo_launcher