2024-12-27 09:05 PM
hi st experts:
I am porting stm32mp2 software to my own robot board(stm32mp257D), after i finished my yocto build, i tried to download image to my board, there was a problem, it seems reconnect devices failed, STM32Cubeprogrammer log:
12:53:51 : STM32CubeProgrammer API v2.18.0 | Linux-64Bits
12:54:00 : UR connection mode is defined with the HWrst reset mode
12:54:00 : USB speed : High Speed (480MBit/s)
12:54:00 : Manuf. ID : STMicroelectronics
12:54:00 : Product ID : DFU in HS Mode @Device ID /0x505, @Revision ID /0x2000
12:54:00 : SN : 002B00254136501800353059
12:54:00 : DFU protocol: 1.1
12:54:00 : Board : --
12:54:00 : Device ID : 0x0505
12:54:06 : Read TSV File: /mnt/ext_disk/code/myb_github/build-openstlinuxweston-zero-robot/tmp-glibc/deploy/images/zero-robot/flashlayout_zero-robot-image-core/optee/FlashLayout_emmc_zero-robot-stm32mp257x-2GB-optee.tsv
12:54:06 : Number of partitions: 14
12:54:14 : Start Embedded Flashing service
12:54:14 : Opening and parsing file: tf-a-zero-robot-stm32mp257x-2GB-usb.stm32
12:54:14 : Memory Programming ...
12:54:14 : File : tf-a-zero-robot-stm32mp257x-2GB-usb.stm32
12:54:14 : Size : 202.86 KB
12:54:14 : Partition ID : 0x01
12:54:14 : Download in Progress:
12:54:15 : File download complete
12:54:15 : Time elapsed during download operation: 00:00:01.472
12:54:15 : RUNNING Program ...
12:54:15 : PartID: :0x01
12:54:16 : Reconnecting the device ...
12:54:17 : USB speed : High Speed (480MBit/s)
12:54:17 : Manuf. ID : STMicroelectronics
12:54:17 : Product ID : DFU @Device ID /0x505, @Revision ID /0x0011, @Name /STM32MP257DAL Rev.Y,
12:54:17 : SN : 002B00254136501800353059
12:54:17 : DFU protocol: 1.1
12:54:17 : Board : --
12:54:17 : Device ID : 0x0505
12:54:17 : Device name : STM32MP257DAL Rev.Y
12:54:17 : Device type :
12:54:17 : Device CPU :
12:54:17 : Start operation done successfully at partition 0x01
12:54:17 : Opening and parsing file: fip-zero-robot-stm32mp257x-2GB-ddr-optee-emmc.bin
12:54:17 : Memory Programming ...
12:54:17 : File : fip-zero-robot-stm32mp257x-2GB-ddr-optee-emmc.bin
12:54:17 : Size : 33.67 KB
12:54:17 : Partition ID : 0x02
12:54:17 : Download in Progress:
12:54:17 : File download complete
12:54:17 : Time elapsed during download operation: 00:00:00.018
12:54:17 : RUNNING Program ...
12:54:17 : PartID: :0x02
12:54:17 : Reconnecting the device ...
12:54:17 : USB speed : High Speed (480MBit/s)
12:54:17 : Manuf. ID : STMicroelectronics
12:54:17 : Product ID : DFU @Device ID /0x505, @Revision ID /0x0011, @Name /STM32MP257DAL Rev.Y,
12:54:17 : SN : 002B00254136501800353059
12:54:17 : DFU protocol: 1.1
12:54:17 : Board : --
12:54:17 : Device ID : 0x0505
12:54:17 : Device name : STM32MP257DAL Rev.Y
12:54:17 : Device type :
12:54:17 : Device CPU :
12:54:17 : Start operation done successfully at partition 0x02
12:54:17 : Opening and parsing file: fip-zero-robot-stm32mp257x-2GB-optee-emmc.bin
12:54:17 : Memory Programming ...
12:54:17 : File : fip-zero-robot-stm32mp257x-2GB-optee-emmc.bin
12:54:17 : Size : 2.62 MB
12:54:17 : Partition ID : 0x03
12:54:17 : Download in Progress:
12:54:19 : File download complete
12:54:19 : Time elapsed during download operation: 00:00:01.507
12:54:19 : RUNNING Program ...
12:54:19 : PartID: :0x03
12:54:19 : Reconnecting the device ...
12:54:49 : Error: Unable to reconnect the target device: time out expired
12:54:49 : Error: Start operation failed at partition 0x03
12:54:49 : Error: TSV flashing service failed
12:54:49 : Disconnected from device.
and i recorded the uart log meanwhile:
NOTICE: CPU: STM32MP257DAL Rev.Y
NOTICE: Model: STMicroelectronics STM32MP257F-EV1 Evaluation Board
INFO: Reset reason (0x2035):
INFO: Power-on Reset (rst_por)
INFO: PMIC2 version = 0x11
INFO: PMIC2 product ID = 0x21
INFO: FCONF: Reading TB_FW firmware configuration file from: 0xe011000
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-stm32mp2-r2.0(debug):devtool-base-1-g5ffab2478(5ffab247)
NOTICE: BL2: Built : 03:29:24, Dec 28 2024
NOTICE: Core ID 5533330b
INFO: EventBuffer0: BuffArea=e03f000 DmaAddr=0e03f000 CoherentMapAddr=0xe03f000
INFO: dwc3_set_dev_speed = HighSpeed
INFO: DFU USB START...
INFO: Event: Link Status Change : ON(0)
INFO: Event: Link Status Change : Early Suspend(5)
INFO: Event: Link Status Change : L2(3)
INFO: Event: Suspend
INFO: USB Suspend mode
INFO: Event: Device Reset
INFO: Event: Device Connection Done
NOTICE: dwc3_get_dev_speed = HighSpeed
INFO: Event: Link Status Change : ON(0)
INFO: Event: Link Status Change : Early Suspend(5)
INFO: Event: Device Reset
INFO: Event: Device Connection Done
NOTICE: dwc3_get_dev_speed = HighSpeed
INFO: Event: Link Status Change : ON(0)
INFO: phase ID :2, Manifestation 0 at e0086b0
INFO: Send detach request
INFO: Receive DFU Detach
INFO: DFU USB STOP...
INFO: BL2: Loading image id 26
INFO: Loading image id=26 at address 0xe041000
INFO: Image id=26 loaded: 0xe041000 - 0xe049650
INFO: BL2: Doing platform setup
INFO: RAM: LPDDR4 1x16Gbits 1x32bits 1200MHz
INFO: Memory size = 0x80000000 (2048 MB)
INFO: DFU USB START...
INFO: Event: Link Status Change : ON(0)
INFO: Event: Link Status Change : Early Suspend(5)
INFO: Event: Link Status Change : L2(3)
INFO: Event: Suspend
INFO: USB Suspend mode
INFO: Event: Device Reset
INFO: Event: Device Connection Done
NOTICE: dwc3_get_dev_speed = HighSpeed
INFO: Event: Link Status Change : ON(0)
INFO: Event: Link Status Change : Early Suspend(5)
INFO: Event: Device Reset
INFO: Event: Device Connection Done
NOTICE: dwc3_get_dev_speed = HighSpeed
INFO: Event: Link Status Change : ON(0)
INFO: phase ID :3, Manifestation 1 at 8729f11e
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 0xe000000
INFO: Image id=1 loaded: 0xe000000 - 0xe000326
INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0xe000000
INFO: FCONF: Reading firmware configuration information for: risaf_config
INFO: RISAF2: No configuration in DT, use default
INFO: FCONF: Reading firmware configuration information for: dyn_cfg
INFO: BL31 max size = 0x17000 (94208B)
INFO: BL2: Loading image id 3
INFO: Loading image id=3 at address 0xe000000
INFO: Image id=3 loaded: 0xe000000 - 0xe0157c0
INFO: BL2: Loading image id 19
INFO: Loading image id=19 at address 0x81fc0000
INFO: Image id=19 loaded: 0x81fc0000 - 0x81fc39ec
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x82000000
INFO: Image id=4 loaded: 0x82000000 - 0x8200001c
INFO: OPTEE ep=0x82000000
INFO: OPTEE header info:
INFO: magic=0x4554504f
INFO: version=0x2
INFO: arch=0x1
INFO: flags=0x0
INFO: nb_images=0x1
INFO: BL2: Loading image id 8
INFO: Loading image id=8 at address 0x82000000
INFO: Image id=8 loaded: 0x82000000 - 0x820cc238
INFO: BL2: Loading image id 2
INFO: Loading image id=2 at address 0x84400000
INFO: Image id=2 loaded: 0x84400000 - 0x84419c18
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0x84000000
INFO: Image id=5 loaded: 0x84000000 - 0x841975f0
NOTICE: BL2: Booting BL31
INFO: Entry point address = 0xe000000
INFO: SPSR = 0x3cd
INFO: ARM GICv2 driver initialized
NOTICE: BL31: v2.8-stm32mp2-r2.0(debug):devtool-base-1-g5ffab2478(5ffab247)
NOTICE: BL31: Built : 03:29:24, Dec 28 2024
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
I/TC: Early console on UART#2
I/TC:
I/TC: Embedded DTB found
I/TC: OP-TEE version: devtool-base-1-g0524ed8a8 (gcc version 12.3.0 (GCC)) #2 Thu Dec 26 16:48:12 UTC 2024 aarch64
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: WARNING: All debug access are allowed
I/TC: Override the OTP 124: 0x8000 to 0x8db6
I/TC: WARNING: Embeds insecure stm32mp_provisioning driver
I/TC: PMIC STPMIC25A V1.1
I/TC: Platform stm32mp2: flavor PLATFORM_FLAVOR - DT zero-robot-stm32mp257x-2GB.dts
I/TC: OP-TEE ST profile: secure_and_system_services
I/TC: DTB enables console (non-secure)
[ 0.000000] SCP-firmware devtool-base-1-g0524ed8a8
[ 0.000000]
[ 0.000000] [FWK] Module initialization complete!
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x84000000
INFO: SPSR = 0x3c5
E/TC:0 Panic 'Watchdog' at /usr/src/debug/optee-os-stm32mp/3.19.0-stm32mp-r2-r0/core/drivers/stm32_iwdg.c:193 <stm32_iwdg_it_handler>
E/TC:0 TEE load address @ 0x82000000
E/TC:0 Call stack:
E/TC:0 0x8200831c
E/TC:0 0x82030254
E/TC:0 0x82019eb0
E/TC:0 0x8202f198
E/TC:0 0x82013fd4
It seams like the optee can not boot uboot component correctly, could you give some advice for this problem, ths~
B&R
Tao
2024-12-27 09:22 PM - edited 2024-12-27 09:44 PM
By the way, my board has the almost same config with evb board, st pmic and st usb chip.
After i adjest the optee log level to 4, there are more information :
[ 0.000000] SCP-firmware devtool-base-1-g0524ed8a8
[ 0.000000]
[ 0.000000] [FWK] Module initialization complete!
F/TC:0 0 stpmic2_register_read:227 REG:0x20 v=0x1e
F/TC:0 0 pmic_get_voltage:146 buck1: get volt 800mV
F/TC:0 0 psu_optee_regulator_get_voltage:136 PSU get regulator stm32-cpu-opp level: 800mV (res 0)
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x84000000
INFO: SPSR = 0x3c5
F/TC:0 pwr_it_handler:127 it_handler
F/TC:0 pwr_it_handler:136 handle wkup irq:0
F/TC:0 pwr_it_call_handler:68 call wkup handler irq:0
F/TC:0 stpmic2_irq_handler:639 Stpmic2 irq
F/TC:0 stpmic2_handle_irq:656 Stpmic2 irq handler
F/TC:0 stpmic2_register_read:227 REG:0x70 v=0x2
F/TC:0 stpmic2_handle_irq:664 Stpmic2 irq pending reg=0 irq=0x2
F/TC:0 stpmic2_irq_callback:621 Stpmic2 it id 1
F/TC:0 stpmic2_irq_callback:625 STPMIC2 send notif 1
D/TC:0 notif_send_it:178 0x1
F/TC:0 stpmic2_register_write:245 REG:0x74 writen v=0x2
F/TC:0 stpmic2_register_read:227 REG:0x71 v=0x0
F/TC:0 stpmic2_register_read:227 REG:0x72 v=0x0
F/TC:0 stpmic2_register_read:227 REG:0x73 v=0x0
D/TC:0 stm32_iwdg_it_handler:174 CPU 0 IT Watchdog 0x44010000
E/TC:0 Panic 'Watchdog' at /usr/src/debug/optee-os-stm32mp/3.19.0-stm32mp-r2-r0/core/drivers/stm32_iwdg.c:193 <stm32_iwdg_it_handler>
E/TC:0 TEE load address @ 0x82000000
E/TC:0 Call stack:
E/TC:0 0x82008578
E/TC:0 0x82033404
E/TC:0 0x8201b190
E/TC:0 0x82032300
E/TC:0 0x820150b4
B&R
Tao
2024-12-28 03:39 AM
Hi,
I suspect a bug in the programmer but not sure see this post if it helps.
Regards,
anpa
2024-12-28 04:12 AM
Hi anpa:
Thanks for your kind reply, but I download image in ubuntu20.04, and I can download offiical ev board image, so i guess there was some dts config in my code not correctly.
B&R
Tao