cancel
Showing results for 
Search instead for 
Did you mean: 

Can't flash SD card on STM32MP157x-EV1, process stops

j_gil
Associate II

Hello everyone,

I'm trying to get started with the STM32MP157 with the STM32MP157x-EV1 Evaluation board by following the exact steps shown here.

Everything seems to be running smoothly but when I try to flash the microSD card on the board, something happens: Apparently the problem begins allright, but then, after the message saying "reconnecting the device..." nothing happens and the flashing stops.

Here's the log:

user@STest:~/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/images/stm32mp1$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-ev1-trusted.tsv 
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.0.0                  
      -------------------------------------------------------------------
 
 
 
USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN          : 000000000000
FW version  : 0x011a
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-ev1-trusted.stm32
  File          : tf-a-stm32mp157c-ev1-trusted.stm32
  Size          : 245360 Bytes
  Partition ID  : 0x01 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:00.654
 
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-ev1-trusted.stm32
  File          : u-boot-stm32mp157c-ev1-trusted.stm32
  Size          : 754169 Bytes
  Partition ID  : 0x03 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:01.143
 
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

Can anyone give me a hand on what may I be doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Sound like you are using an old HW used for Alpha customer, I will contact you by email to solve this.

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

22 REPLIES 22
PatrickF
ST Employee

Hello,

Could you try adding "-tm 10000" on the command (increase default timeout to 10 seconds) ?

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.
j_gil
Associate II

Hi Patrick,

Thanks for the advice, but unfortunately, after trying that, I still get the same results. I must point out that I've been trying this on both a VM and a dedicated PC, getting the exact same results.

Also, I've just tried to flash on Windows and still get the same, process stops at the same step.

  

I'm starting to think that this might be a hardware issue, although I've tried with two different STM32MP157X-EVAL. One thing that looks strange is that the VCCIO L.E.D. never turns on, no matter what, when the other two, for 3V3 and 5V turn on as soon as I power the board.

Maybe I should try to supply this rail externally with 1V8?

On the other hand, I've also tried flashing the SD card directly following this instructions, and well, I get something on the serial port, but it still won't boot...

(boot switch are in boot position) This is what I get:

NOTICE:  CPU: STM32MP157A?? Rev.A
NOTICE:  Model: STMicroelectronics STM32MP157C eval daughter on eval mother
INFO:    Reset reason (0x14):
INFO:      Pad Reset from NRST
INFO:    Using SDMMC
INFO:      Instance 1
INFO:    Boot used partition fsbl1
INFO:    Product_below_2v5=1: HSLVEN update is
INFO:      destructive, no update as VDD>2.7V
NOTICE:  BL2: v2.0(debug):
NOTICE:  BL2: Built : 13:13:37, Oct  2 2018
INFO:    BL2: Doing platform setup
INFO:    PMIC version = 0x00
INFO:    RAM: DDR3-1066/888 bin G 2x4Gb 533MHz v1.41
INFO:    Memory size = 0x40000000 (1024 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:    Loading image id=5 at address 0xc0100000
INFO:    STM32 Image size : 753913
WARNING: Skip signature check (header option)
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01b80f9
INFO:    read version 0 current version 0
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2fff0000
INFO:    SPSR = 0x1d3
INFO:    PMIC version = 0x00
NOTICE:  SP_MIN: v2.0(debug):
NOTICE:  SP_MIN: Built : 13:13:37, Oct  2 2018
INFO:    ARM GICv2 driver initialized
▒▒▒▒▒r@@@▒▒▒▒▒▒▒▒▒▒▒@▒▒▒▒▒▒▒▒▒▒▒@▒▒@▒▒@z@`▒b▒▒▒f▒`▒▒▒▒▒▒▒▒▒▒@▒▒▒▒}`▒``````an@▒▒z@`▒▒▒▒▒▒▒▒▒

 EDIT: Just started monitoring the serial port when trying to flash and this is what it recorded, apparently it always stops working after initializing the ARM GICv2 driver:

NOTICE:  CPU: STM32MP157A?? Rev.A
NOTICE:  Model: STMicroelectronics STM32MP157C eval daughter on eval mother
INFO:    Reset reason (0x14):
INFO:      Pad Reset from NRST
INFO:    Using USB
INFO:      Instance 2
INFO:    Boot used partition fsbl1
INFO:    Product_below_2v5=1: HSLVEN update is
INFO:      destructive, no update as VDD>2.7V
NOTICE:  BL2: v2.0(debug):
NOTICE:  BL2: Built : 13:13:37, Oct  2 2018
INFO:    BL2: Doing platform setup
INFO:    PMIC version = 0x00
INFO:    RAM: DDR3-1066/888 bin G 2x4Gb 533MHz v1.41
INFO:    Memory size = 0x40000000 (1024 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 0x2ffee768
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:                   Phase ID : 0
INFO:                   address 0x2ffee768
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 0x2ffee768
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:                   Phase ID : 3
INFO:                   address 0x2ffee768
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    usb_partition_size: partition size : 0xb80f9
INFO:    Start Download partition 3 to address 0xc0100000 length 753913
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 - 0xc01b80f9
INFO:    read version 0 current version 0
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2fff0000
INFO:    SPSR = 0x1d3
INFO:    PMIC version = 0x00
NOTICE:  SP_MIN: v2.0(debug):
NOTICE:  SP_MIN: Built : 13:13:37, Oct  2 2018
INFO:    ARM GICv2 driver initialized
▒▒▒▒▒z@@@▒▒▒▒▒▒▒▒▒▒▒@▒▒▒▒▒▒▒▒▒▒▒@▒▒@▒▒@z@`▒b▒▒▒n▒`▒▒▒▒▒▒▒▒▒▒@▒▒▒▒}`▒``````af@▒▒z@`▒▒▒▒▒▒▒▒▒

 EDIT2: Checked with multimeter, no 1V8 whatsoever, not even at the output capacitors of the PMIC on board MB1263B.

PatrickF
ST Employee

Sound like you are using an old HW used for Alpha customer, I will contact you by email to solve this.

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.
DKanl
Associate

Hello, I m having exactly the same problem with the 2 STM32MP157C-DK2 Discovery Boards. Can you please help me?

PatrickF
ST Employee

Hello, could you please provide the exact command line you used and the console log ?

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.
Thank you for your response. The problems are solved after I tried again with the updated guide Infound. It wasn’t clear to me with the old guide that the second usb c connection to the pc was needed and run a not timeouts during flashing the Linux distribution. Στάλθηκε από το iPad μου 22 Μα�? 2019, 9:20 πμ, ο χ�?ήστης «ST Community » έγ�?αψε:

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.

CHolz.1
Associate II

Hello, I have the same problem. Attached the log messages of the linux host and the mp1 board. Can you please help me?

osboxes@osboxes:~/STM32MPU_workspace/STM32MP15-Ecosystem-v1.1.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-10-09/images/stm32mp1$ 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          : 002100273338510B39303435
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.718
 
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:01.313
 
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
osboxes@osboxes:~/STM32MPU_workspace/STM32MP15-Ecosystem-v1.1.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-10-09/images/stm32mp1$ 
NOTICE:  CPU: STM32MP157CAC Rev.B
NOTICE:  Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
NOTICE:  Board: MB1272 Var2 Rev.C-01
INFO:    Reset reason (0x14):
INFO:      Pad Reset from NRST
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
INFINFO:    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
NAND:  0 MiB
MMC:   STM32 SDMMC2: 0, STM32 SDMMC2: 1
In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0 
Boot over usb0!

maybe have a look to this post also https://community.st.com/s/question/0D50X0000Bftpj3SQA/cant-able-to-populate-the-target-and-boot-the-image-on-stm32mp157cdk2

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.