cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157C-DK2 not getting populated.

Puranjay Mohan
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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)

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.

View solution in original post

13 REPLIES 13
PatrickF
ST Employee

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

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.
Puranjay Mohan
Associate II

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.

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)

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.

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.

Could you please try to add "-tm 20000" to CubeProgrammer command line. This is to increase the timeout duration which is sometimes required to give enough time for the PC to reload/restart the DFU driver on uBoot (re)connection.

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.

I tried it, It didn't work too!. I think once the red led starts blinking, it will never connect :

What should I do?

Thanks

$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv -tm 20000
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.2.0                  
      -------------------------------------------------------------------
 
 
 
Warning: Timeout is forced to 20000 ms
 
 
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.657
 
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.960
 
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

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)

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.

I don't think it is power supply's fault as I have specially bought a 3.1 Amp 5v supply for this, also when we start the flashing the led doesn't blink. Led starts blinking only after it tries to reconnect.

I will try to get the console output and then get back to you.

thanks

Here is the console output

NOTICE:  CPU: STM32MP157CAC Rev.B
NOTICE:  Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
NOTICE:  Board: MB1272 Var2 Rev.C-01
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    Using USB
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.0-r1.5(debug):
NOTICE:  BL2: Built : 13:13:37, Oct  2 2018
INFO:    BL2: Doing platform setup
INFO:    PMIC version = 0x10
INFO:    RAM: DDR3-1066/888 bin G 1x4Gb 533MHz v1.45
INFO:    Memory size = 0x20000000 (512 MB)
INFO:    BL2 runs SP_MIN setup                                                  
INFO:    BL2: Loading image id 4                                                
INFO:    Loading image id=4 at address 0x2fff0000                               
INFO:    Image id=4 loaded: 0x2fff0000 - 0x30000000                             
INFO:    BL2: Loading image id 5                                                
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    Receive DFU abort                                                      
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    UPLOAD :                                                               
INFO:                   Phase ID : 0                                            
INFO:                   address 0x2ffee780                                      
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    UPLOAD :                                                               
INFO:                   Phase ID : 0                                            
INFO:                   address 0x2ffee780                                      
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    Start Download partition 0 to address 0xc0000000 length 0              
INFO:    USB : DFU : end of download partition : 0                              
INFO:    Loading image id=5 at address 0xc0100000                               
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    UPLOAD :                                                               
INFO:                   Phase ID : 3                                            
INFO:                   address 0x2ffee780                                      
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    receive request 6                                                      
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    UPLOAD :                                                               
INFO:                   Phase ID : 3                                            
INFO:                   address 0x2ffee780                                      
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    usb_partition_size: partition size : 0xc498a                           
INFO:    Start Download partition 3 to address 0xc0100000 length 805258         
INFO:    USB : DFU : end of download partition : 3                              
WARNING: Skip signature check (header option)                                   
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    UPLOAD :                                                               
INFO:                   Phase ID : 0                                            
INFO:                   address 0xffffffff                                      
INFO:    Send detach request                                                    
INFO:    GETSTATUS :                                                            
INFO:                   DFU_STATE_IDLE                                          
INFO:    Receive Detach                                                         
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01c498a                             
INFO:    read version 0 current version 0                                       
NOTICE:  BL2: Booting BL32                                                      
INFO:    Entry point address = 0x2fff0000                                       
INFO:    SPSR = 0x1d3                                                           
INFO:    PMIC version = 0x10                                                    
NOTICE:  SP_MIN: v2.0-r1.5(debug):                                              
NOTICE:  SP_MIN: Built : 13:13:37, Oct  2 2018                                  
INFO:    ARM GICv2 driver initialized                                           
INFO:    stm32mp HSI (18): Secure only                                          
INFO:    stm32mp HSE (20): Secure only                                          
INFO:    stm32mp PLL2 (27): Secure only                                         
INFO:    stm32mp PLL2_R (30): Secure only                                       
INFO:    SP_MIN: Initializing runtime services                                  
INFO:    SP_MIN: Preparing exit to normal world                                 
                                                                                
                                                                                
U-Boot 2018.11-stm32mp-r3 (Nov 14 2018 - 16:10:06 +0000)                        
                                                                                
CPU: STM32MP157CAC Rev.B                                                        
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board                       
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)                            
Board: MB1272 Var2 Rev.C-01                                                     
DRAM:  512 MiB                                                                  
Clocks:                                                                         
- MPU : 650 MHz                                                                 
- MCU : 208.878 MHz                                                             
- AXI : 266.500 MHz                                                             
- PER : 24 MHz                                                                  
- DDR : 533 MHz                                                                 
****************************************************                            
* ERROR USB TYPE-C connection in unattached mode   *                            
* Check that USB TYPE-C cable is correctly plugged *                            
*     Current too low, use a 3A power supply!      *                            
****************************************************