cancel
Showing results for 
Search instead for 
Did you mean: 

cubeprogrammer doesn't reconnect after flashing for stm32mp157f-dk2

JPabl.1
Senior

I'm following the starter and distribution package for the stm32mp157f-dk2.

A few weeks ago I was able to flash my target board with the starter package and can confirm it initialized the st gui and so on.I also added the usb gadget in my vm as stated on another post.

Now, I'm trying to flash the st-image from the distribution package but its not able to reconnect.\

I'm using an iphone quick charge that outputs 5v 3A and it worked for the starter package. I tried with another power supply just to confirm that's not the issue and I got the error in st-link. Which means my iphone quick charge is ok

 

***************** * 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! * ******************

 

 These are the logs from cubeprogrammer:

 

vboxuser@ubuntu:~/stm-envirionment/Distribution-Package/build-openstlinuxweston-stm32mp15-disco/tmp-glibc/deploy/images/stm32mp15-disco$ STM32_Programmer_CLI -l usb ------------------------------------------------------------------- STM32CubeProgrammer v2.17.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 : 002000403132511831373339 Firmware version : 0x0110 Device ID : 0x0500 vboxuser@ubuntu:~/stm-envirionment/Distribution-Package/build-openstlinuxweston-stm32mp15-disco/tmp-glibc/deploy/images/stm32mp15-disco$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv ------------------------------------------------------------------- STM32CubeProgrammer v2.17.0 ------------------------------------------------------------------- USB speed : High Speed (480MBit/s) Manuf. ID : STMicroelectronics Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000 SN : 002000403132511831373339 DFU protocol: 1.1 Board : -- Device ID : 0x0500 Device name : STM32MP15xx Device type : MPU Revision ID : -- Device CPU : Cortex-A7 Start Embedded Flashing service Memory Programming ... Opening and parsing file: tf-a-stm32mp157f-dk2-usb.stm32 File : tf-a-stm32mp157f-dk2-usb.stm32 Size : 220,41 KB Partition ID : 0x01 Download in Progress: [==================================================] 100% File download complete Time elapsed during download operation: 00:00:06.226 RUNNING Program ... PartID: :0x01 Start operation done successfully at partition 0x01 Memory Programming ... Opening and parsing file: fip-stm32mp157f-dk2-optee-sdcard.bin File : fip-stm32mp157f-dk2-optee-sdcard.bin Size : 1,40 MB Partition ID : 0x03 Download in Progress: [==================================================] 100% File download complete Time elapsed during download operation: 00:00:23.608 RUNNING Program ... PartID: :0x03 Reconnecting the device ... USB speed : High Speed (480MBit/s) Manuf. ID : STMicroelectronics Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157FAC Rev.Z, SN : 002000403132511831373339 DFU protocol: 1.1 Board : -- Device ID : 0x0500 Device name : STM32MP157FAC Rev.Z Device type : MPU Device CPU : Cortex-A7 Start operation done successfully at partition 0x03 Flashlayout Programming ... [==================================================] 100% Running Flashlayout Partition ... Reconnecting the device ... Error: Unable to reconnect the target device: time out expired Error: Start Operation failed at Flashlayout partition Error: TSV flashing service failed
View more

 

These are the logs from st link:

 

NOTICE: CPU: STM32MP157FAC Rev.Z NOTICE: Model: STMicroelectronics STM32MP157F-DK2 Discovery Board NOTICE: Board: MB1272 Var4.0 Rev.C-03 INFO: PMIC version = 0x21 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: FCONF: Reading firmware configuration information for: stm32mp_fuse INFO: Using USB INFO: Instance 2 INFO: Boot used partition fsbl1 NOTICE: BL2: v2.8-stm32mp1-r2.0(debug):lts-v2.8.15-dirty(567af710) NOTICE: BL2: Built : 00:51:33, Jan 26 2024 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 c716614a 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 - 0x2ffff1ea 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 0xde000000 INFO: Image id=4 loaded: 0xde000000 - 0xde00001c INFO: OPTEE ep=0xde000000 INFO: OPTEE header info: INFO: magic=0x4554504f INFO: version=0x2 INFO: arch=0x0 INFO: flags=0x0 INFO: nb_images=0x1 INFO: BL2: Loading image id 8 INFO: Loading image id=8 at address 0xde000000 INFO: Image id=8 loaded: 0xde000000 - 0xde030e08 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 - 0xc0520380 INFO: BL2: Skip loading image id 16 INFO: BL2: Loading image id 5 INFO: Loading image id=5 at address 0xc0100000 INFO: Image id=5 loaded: 0xc0100000 - 0xc0214c94 NOTICE: BL2: Booting BL32 INFO: Entry point address = 0xde000000 INFO: SPSR = 0x1d3 I/TC: Early console on UART#4 I/TC: I/TC: Embedded DTB found I/TC: OP-TEE version: 3.19.0-dev (gcc version 12.3.0 (GCC)) #1 Fri Oct 14 19:00:05 UTC 2022 arm I/TC: WARNING: This OP-TEE configuration might be insecure! I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html I/TC: Primary CPU initializing I/TC: Override the OTP 18: 0x7a3d0000 to 0x7a3d01e0 I/TC: WARNING: Embeds insecure stm32mp_provisioning driver I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp157f-dk2.dts I/TC: OP-TEE ST profile: system_services I/TC: DTB enables console (non-secure) I/TC: Primary CPU switching to normal world boot optee optee: OP-TEE: revision 3.19 (afacf356) U-Boot 2022.10-stm32mp-r2 (Oct 03 2022 - 19:25:32 +0000) CPU: STM32MP157FAC Rev.Z Model: STMicroelectronics STM32MP157F-DK2 Discovery Board Board: stm32mp1 in trusted mode (st,stm32mp157f-dk2) Board: MB1272 Var4.0 Rev.C-03 DRAM: 512 MiB optee optee: OP-TEE: revision 3.19 (afacf356) Clocks: - MPU : 800 MHz - MCU : 208.878 MHz - AXI : 266.500 MHz - PER : 24 MHz - DDR : 533 MHz Core: 361 devices, 44 uclasses, devicetree: board WDT: Started watchdog with servicing (32s timeout) NAND: 0 MiB MMC: STM32 SD/MMC: 0 Loading Environment from nowhere... OK In: serial Out: serial Err: serial Net: eth0: ethernet@5800a000 No EFI system partition Hit any key to stop autoboot: 0 Boot over usb0! DFU alt info setting: done # UPLOAD ... done Ctrl+C to exit ... # FlashLayout received, size = 747 DOWNLOAD ... OK Ctrl+C to exit ... # UPLOAD ... done Ctrl+C to exit ... partitions on mmc0: Writing GPT: success! done Erasing fip-b on mmc 0: done Erasing u-boot-env on mmc 0: done DFU alt info setting: done
View more

 

I already did the solution in this post:https://community.st.com/t5/stm32-mpus/faq-stm32mp1-stm32cubeprogrammer-usb-reconnect-error-at-stm32mp1/ta-p/49263 but that doesn't help

 

1 ACCEPTED SOLUTION

Accepted Solutions
JPabl.1
Senior

I decided to flash the microsd directly using the dd command from linux and that worked. 

View solution in original post

1 REPLY 1
JPabl.1
Senior

I decided to flash the microsd directly using the dd command from linux and that worked.