cancel
Showing results for 
Search instead for 
Did you mean: 

Issue flashing custom STM32MP151 device tree image with STM32CubeProgrammer

sabry
Visitor

Hello everyone,

I’m currently developing a custom board based on STM32MP151A, and I’ve successfully built my Open ST Linux  (Yocto Scarthgap / v6.6) image using my own Device Tree generated from STM32CubeMX and further customized for our hardware.

The build process completes successfully — both U-Boot and Linux kernel compile without errors, and the final image is correctly produced.

However, when I try to flash the image to the target using STM32CubeProgrammer, the upload fails and I get the error log attached below.

12:56:16:446 : USB speed : High Speed (480MBit/s)
12:56:16:446 : Manuf. ID : STMicroelectronics
12:56:16:446 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
12:56:16:446 : SN : 003E00273030510D34343437
12:56:16:446 : DFU protocol: 1.1
12:56:16:446 : Board : --
12:56:16:446 : Device ID : 0x0500
12:56:17:452 : Start Embedded Flashing service
12:56:17:452 : sending a set alternate setting request with index: 5
12:56:17:453 : receiving packet
12:56:17:454 : DFU status = 0 : OK
12:56:17:454 : DFU state = 2 : dfuIDLE
12:56:17:454 : UpLoading data
12:56:17:457 : DFU status = 0 : OK
12:56:17:457 : DFU state = 2 : dfuIDLE
12:56:17:458 : sending a set alternate setting request with index: 1
12:56:17:458 : Opening and parsing file: tf-a-stm32mp151a-ap31085500a-mx-optee-programmer-usb.stm32
12:56:17:458 : Memory Programming ...
12:56:17:459 : File : tf-a-stm32mp151a-ap31085500a-mx-optee-programmer-usb.stm32
12:56:17:460 : Size : 216.41 KB
12:56:17:460 : Partition ID : 0x01
12:56:17:460 : Download in Progress:
12:56:17:460 : Size : 221605 Bytes
12:56:17:460 : sending packet nbr: 0
12:56:17:460 : DFU status = 0 : OK
12:56:17:460 : DFU state = 2 : dfuIDLE

.....

12:57:01:577 : DFU state = 2 : dfuIDLE
12:57:01:577 : sending a set alternate setting request with index: 5
12:57:01:577 : receiving packet
12:57:24:435 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
12:57:24:435 : sending a clear status request

on terminal appeare

 

PANIC at PC : 0x2ffecb13

Exception mode=0x00000016 at: 0x2ffecb13

 

I would really appreciate any insight into what might be wrong with my image layout or device tree setup.
It could be something related to boot chain configuration, flashlayout definition, or maybe a mismatch between TF-A / U-Boot and my DTB or something wrong in Device Tree?

Any help or guidance would be greatly appreciated!

Thanks,
Sabry

0 REPLIES 0