cancel
Showing results for 
Search instead for 
Did you mean: 

Can't flash emmc on SoM MYC-YA157C-V2 (STM32MP157A), time out expired

IGlus.1
Associate

Hello

I have problem, i can't flash emmc on SoM MYC-YA157C-V2 (STM32MP157A).

I use STM32CubeProgrammer ver.2.11.0 under Windows 11 OS.

Tried to use STM32CubeProgrammer and _CLI (with different wait timeouts).

My firmware script:

set tsv="FlashLayout_emmc_stm32mp157c-ya157c-512d-v2-trusted.tsv"
set stprog="C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe"
 
%stprog% -c port=usb1 -tm 30000 -w %tsv%

While downloading i get the following log:

Warning: Timeout is forced to 30000 ms
 
 
USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN          : 003F00333130511539373430
DFU protocol: 1.1
Board       : --
Device ID   : 0x0500
Device name : STM32MP1
Device type : MPU
Revision ID : --
Device CPU  : Cortex-A7
 
Start Embedded Flashing service
 
 
 
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-ya157c-512d-v2-serialboot.stm32
  File          : tf-a-stm32mp157c-ya157c-512d-v2-serialboot.stm32
  Size          : 236.31 KB
  Partition ID  : 0x01
 
Download in Progress:
ЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫ 100%
 
File download complete
Time elapsed during download operation: 00:00:07.440
 
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-ya157c-512d-v2-trusted.stm32
  File          : u-boot-stm32mp157c-ya157c-512d-v2-trusted.stm32
  Size          : 852.12 KB
  Partition ID  : 0x03
 
Download in Progress:
ЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫ 100%
 
File download complete
Time elapsed during download operation: 00:00:00.937
 
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

And log from UART4 (debug):

NOTICE:  CPU: STM32MP157AAC Rev.Z
NOTICE:  Model: MYIRTECH MYD-YA157C-512D v2 Development Board
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    Using USB
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.2-r1.0(debug):v2.2-stm32mp-r1-9-g23ff275
NOTICE:  BL2: Built : 10:26:58, Aug 12 2020
INFO:    Using crypto library 'stm32_crypto_lib'
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-1066/888 bin G 2x2Gb 533MHz v1.44
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 0x2ffed000
INFO:    Image id=4 loaded: 0x2ffed000 - 0x2ffff000
INFO:    BL2: Loading image id 5
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:                   Phase ID : 0
INFO:                   address 0x2ffe7988
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:                   Phase ID : 0
INFO:                   address 0x2ffe7988
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 0x2ffe7988
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:                   Phase ID : 3
INFO:                   address 0x2ffe7988
INFO:    GETSTATUS :
INFO:                   DFU_STATE_IDLE
INFO:    usb_partition_size: partition size : 0xd4f7b
INFO:    Start Download partition 3 to address 0xc0100000 length 872315
INFO:    USB : DFU : end of download partition : 3
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 - 0xc01d4f7b
WARNING: Skip signature check (header option)
NOTICE:  ROTPK is not deployed on platform. Skipping ROTPK verification.
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2ffed000
INFO:    SPSR = 0x1d3
NOTICE:  SP_MIN: v2.2-r1.0(debug):v2.2-stm32mp-r1-9-g23ff275
NOTICE:  SP_MIN: Built : 10:26:58, Aug 12 2020
INFO:    ARM GICv2 driver initialized
INFO:    stm32mp IWDG1 (12): Secure
INFO:    ETZPC: CRYP1 (9) could be non secure
INFO:    SP_MIN: Initializing runtime services
INFO:    SP_MIN: Preparing exit to normal world
 
 
U-Boot 2020.01-stm32mp-r1 (Oct 27 2020 - 10:11:51 +0000)
 
CPU: STM32MP157AAC Rev.Z
Model: MYIRTECH MYD-YA157C v2 Development Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-ya157c-v2)
DRAM:  512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Fastboot key pressed, entering download mode...
WDT:   Started with servicing (32s timeout)
NAND:  0 MiB
MMC:   STM32 SD/MMC: 0, STM32 SD/MMC: 1
In:    serial
Out:   serial
Err:   serial
Enter fastboot!
invalid MAC address in OTP 00:00:00:00:00:00
Net:
Warning: ethernet@5800a000 (eth0) using random MAC address - a2:4e:a5:d2:95:86
eth0: ethernet@5800a000

Pin USB_OTG_VBUS is connected to 5V (I also tried turning it no connection).

When connecting the USB and switching the board to the download mode (boot 1 = boot 2 = boot 0 = 0), I see: DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

And when I start script and core reboots, I see: USB download gadget (without install drivers).

Does anyone know what might be wrong?

2 REPLIES 2
PatrickF
ST Employee

Hi @IGlus.1​ 

Don't know if it is the root cause, but seems you defined st,fastboot-gpios in uBoot DT and the GPIO is seen as active by uBoot.

Please check your Device Tree and/or HW.

See https://wiki.st.com/stm32mpu/wiki/How_to_configure_U-Boot_for_your_board#Config_node

Similar check needed for st,stm32prog-gpios

Regards,

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.
Kevin HUBER
ST Employee

Hello @IGlus.1​ ,

Have you been able to flash using CubeProg or do you still need help?

Regards,

Kevin

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.