2025-12-19 7:32 AM
I am working on a custom board based on STM32MP267FAK3 and facing issues while flashing eMMC directly using STM32CubeProgrammer.
SoC: STM32MP267FAK3
DDR: DDR3L (part no: MT41K512M16VRP-107 )
eMMC: Custom eMMC MX52LM08A11XVW
SD Card: Not populated / no SD card provision on board
I have already made board-specific changes in:
TF-A (DDR + PMIC configuration generated using CubeMX tool)
OP-TEE
U-Boot
Linux kernel
Flashing eMMC directly using STM32CubeProgrammer
Interface: USB (DFU)
Using a TSV file generated from the build system (same method as reference BSP)
TSV File
When flashing the eMMC, I consistently get a timeout error in STM32CubeProgrammer.
My questions are:
2025-12-19 8:02 AM
Hi, there might be two main root causes to look first:
- USB re-connection if you are using a Virtual machine. Check your VM settings or try using CubeProg under W11
- TF-A or uBoot (partition 0x1 or 0x2) is crashing (e.g. DDR init or else), please check board UART console log for error messages.
Regards.
2025-12-20 4:43 AM - edited 2025-12-20 5:11 AM
Hii,
I am not using Virtual Machine. I am using STM32CubeProgrammer for flashing.
I connected UART for checking logs this time and got the below mentioned error:
NOTICE: CPU: STM32MP257FAK Rev.Y
NOTICE: Model: STMicroelectronics STM32MP257F-DK Discovery Board
NOTICE: Reset reason: Power-on reset (por_rstn) (0x2035)
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_fuse
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.10-stm32mp2-r2.0(debug):lts-v2.10.13-dirty(b1f57509)
NOTICE: BL2: Built : 17:10:59, Feb 14 2025
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
INFO: 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
INFO: dwc3_get_dev_speed = HighSpeed
INFO: Event: Link Status Change : ON(0)
INFO: phase ID :2, Manifestation 0 at e005488
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 - 0xe046428
INFO: BL2: Doing platform setup
INFO: RAM: DDR3 16bits 933000kHz
ERROR: ddrphy_phyinit_usercustom_g_waitfwdone Training has failed.
ERROR: DDR PHY init: Error -1
BACKTRACE: START: stm32mp2_ddr_init
0: EL3: 0xe017ba0
1: EL3: 0xe01e358
2: EL3: 0xe01ecd8
3: EL3: 0xe028a9c
4: EL3: 0xe017974
5: EL3: 0xe017ad4
6: EL3: 0xe0170e0
BACKTRACE: END: stm32mp2_ddr_init
PANIC at PC : 0x000000000e01e360
Can you tell me why this error is coming. I have done changes in dts files present in tf-a and optee for ddr and pmic settings for ddr3L at 933MHz and also the memory node for DDR which is also mentioned below:
memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x40000000>;
};
Is there anything else remaining to be changed? Why this training failed error is coming?
I am sharing my files generated from CubeMX for your verification