2019-11-26 01:54 AM
Hello,
We are playing with STM32MP157C-DK2 and trying to setup the device through the getting started provided at URL: https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Let%27s_start/Unpack_the_STM32MP157C-DK2_board
We can't able to populate the SD card and it prints the following error:
sach@sach-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/images/stm32mp1$ STM32_Programmer_CLI -l usb
-------------------------------------------------------------------
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 : 001
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
Serial number : 003100173338510B39303435
Firmware version : 0x0110
Device ID : 0x0500
sach@sach-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/images/stm32mp1$ STM32_Programmer_CLI -l usb
-------------------------------------------------------------------
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 : 001
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
Serial number : 003100173338510B39303435
Firmware version : 0x0110
Device ID : 0x0500
sach@sach-VirtualBox:~/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-dk2-truste
d.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 : 003100173338510B39303435
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:00.903
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:01.795
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
Could you please guide me? Thanking you!
Solved! Go to Solution.
2019-11-29 01:07 AM
If you are using a Virtual Machine, could you try using CubeProgrammer on Windows (with VirtualBox/VMWare not running) ?
2019-11-26 02:10 AM
Hello,
Seems your use a Virtual Manchine.
When uBoot start, it reconnect the USB, the Virtual Machine could take longer to get the USB driver up and running on VM side (in some settings, it could be also stuck on Windows side), could you try to add -tm 20000 to the CubeProgrammer command line to increase the timeout?
Could you also provide the log of the DK2 console output (available as VCP 115200 8 N 1 using ST-Link connector) ?
2019-11-26 02:29 AM
Hello @PatrickF ,
Thanks for the quick response.
I have tried to increase the timeout:
sach@sach-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/images/stm32mp1$ STM32_Programm
er_CLI -c port=usb1 -tm 20000 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
But still got the same error.
Here is the log of the DKL2 console:
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
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 = 0x10
INFO: RAM: DDR3-1066/888 bin G 1x4Gb 533MHz v1.41
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 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: receive request 6
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 : 0xb6b74
INFO: Start Download partition 3 to address 0xc0100000 length 748404
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 - 0xc01b6b74
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(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-r2 (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
Watchdog enabled
DRAM: 512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
*******************************************
* WARNING 500mA power supply detected *
* Current too low, use a 3A power supply! *
*******************************************
NAND: 0 MiB
MMC: STM32 SDMMC2: 0, STM32 SDMMC2: 1
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Boot over usb0!
partitions : Writing GPT: success!
done
DFU alt info setting: done
crq->brequest:0x0
Thanking you!
2019-11-28 05:31 AM
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
2019-11-29 01:07 AM
If you are using a Virtual Machine, could you try using CubeProgrammer on Windows (with VirtualBox/VMWare not running) ?
2019-12-02 12:06 AM
@PatrickF .
I will try above both suggested approaches and inform you.
2019-12-02 02:55 AM
Hello @PatrickF ,
Thanks for the kind help. It's working with CubeProgrammer on Windows. Could you please explain me the reason?
How can I make it run through VMWare on Ubuntu 16.04? I want to setup https://wiki.st.com/stm32mpu/wiki/STM32MP1_artificial_intelligence_expansion_packages. All the instructions/commands are given for the Linux based system so it seems to be relatively easy with Linux.
One way is that I can compile and build AI library on Linux distribution and flash it to a device using Windows. Will this work?
Could you please guide me?
2019-12-03 12:17 AM
Issue could be on USB port on Virtual Machine which are not always automatically connected.
In VMWare, you have a menu (Player/Removable Devices) where you can choose which devices belong to Virtual Machine or to Windows. I think VirtualBox should have similar setting.
When uBoot start, it will reconnect using different USB descriptor (USB download gadget@Device ID /0x500, @Revision ID /0x0000). Please check at that time in your VM if you have one new removable device to 'connect' to your Virtual Machine.
Once done, this setting should be persistent in your VM and you can retry the DK2 programming process from scratch.
2019-12-03 03:44 AM
Thanks for sharing your views!
2023-03-02 07:44 PM
Hello @PatrickF , Community.
I got same problem but probably a bit deeper. Please give me some advice.
So, on the same stage I have same problem, with exception that USB filter at VM are set by vendor ID(0483) . I try this way , and same steps described here.
St-link trace and query below. I took images from en.FLASH-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23.tar for my mp157a-dk1 board, just renamed it to simplify input.
First of all i do the same in STMCubeProgrammer app, variants OPTEE and TRUSTED.
Also I tried the same on standalone Ubuntu 18, same results(on Win tried too). I try two ways via usb and uart. with UART there is different output, but same disconnection and no boot(OTP query doesn't work too)
Am I right that on this step it doesn't matter presence and condition of SDcard?
where should I look mistake? the board is new, no hardware changes was made.
UART try:
STM32_Programmer_CLI -c port=ttyACM0 -tm 20000 -w FlashLayout_sdcard_stm32mp157a-dk1-raw.tsv
-------------------------------------------------------------------
STM32CubeProgrammer v2.12.0
-------------------------------------------------------------------
Warning: Timeout is forced to 20000 ms
Serial Port ttyACM0 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,
stop-bit = 1.0, flow-control = off
Activating device: OK
Board : --
Chip ID: 0x500
BootLoader protocol version: 4.0
Device name : STM32MP15xx
Device type : MPU
Revision ID : --
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157a-dk1-uart.stm32
File : tf-a-stm32mp157a-dk1-uart.stm32
Size : 216.38 KB
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:37.201
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Memory Programming ...
Opening and parsing file: fip-stm32mp157a-dk1-trusted.bin
File : fip-stm32mp157a-dk1-trusted.bin
Size : 1.14 MB
Partition ID : 0x03
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:03:19.671
RUNNING Program ...
PartID: :0x03
Start operation done successfully at partition 0x03
Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
Error: GetPhase command not acknowledged after several retries!
Error: Parition 0xBB not found in TSV File
Error: TSV flashing service failed
USB try:
NOTICE: CPU: STM32MP157AAC Rev.B
NOTICE: Model: STMicroelectronics STM32MP157A-DK1 Discovery Board
NOTICE: Board: MB1272 Var1.0 Rev.C-01
INFO: PMIC version = 0x10
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.6-stm32mp1-r2.0(debug):v2.6-dirty(a1f02f4f)
NOTICE: BL2: Built : 13:14:26, Nov 23 2021
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 533000kHz
INFO: Memory size = 0x20000000 (512 MB)
INFO: DFU USB START...
INFO: phase ID :3, Manifestation 3 at c7122c98
INFO: Send detach request
INFO: Receive DFU Detach
INFO: DFU USB STOP...
INFO: BL2: Loading image id 1
INFO: Loading image id=1 at address 0x2ffff000
INFO: Image id=1 loaded: 0x2ffff000 - 0x2ffff226
INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO: FCONF: Reading firmware configuration information for: dyn_cfg
INFO: FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2ffc5000
INFO: Image id=4 loaded: 0x2ffc5000 - 0x2ffd9820
INFO: BL2: Skip loading image id 8
INFO: BL2: Skip loading image id 9
INFO: BL2: Loading image id 2
INFO: Loading image id=2 at address 0xc0500000
INFO: Image id=2 loaded: 0xc0500000 - 0xc051cdf8
INFO: BL2: Loading image id 16
INFO: Loading image id=16 at address 0x2ffc0000
INFO: Image id=16 loaded: 0x2ffc0000 - 0x2ffc44d2
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0xc0100000
INFO: Image id=5 loaded: 0xc0100000 - 0xc01ece88
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2ffc5000
INFO: SPSR = 0x1d3
bg
STM32_Programmer_CLI -c port=usb1 \
> -d tf-a-usb.stm32 0x1 -s 0x1 \
> -d fip.bin 0x3 -s 0x3
-------------------------------------------------------------------
STM32CubeProgrammer v2.12.0
-------------------------------------------------------------------
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 004400383338510C39303435
DFU protocol: 1.1
Board : --
Device ID : 0x0500
Device name : STM32MP15xx
Device type : MPU
Revision ID : --
Device CPU : Cortex-A7
Memory Programming ...
Opening and parsing file: tf-a-usb.stm32
File : tf-a-usb.stm32
Size : 220.38 KB
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:03.675
RUNNING Program ...
Address: : 0x1
Start operation achieved successfully
Memory Programming ...
Opening and parsing file: fip.bin
File : fip.bin
Size : 1.14 MB
Partition ID : 0x03
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:18.355
RUNNING Program ...
Address: : 0x3
Reconnecting the device ...
Error: Unable to reconnect the target device: time out expired
Error: Start operation failed