cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Flashing STM32DDRFW-UTIL over USB

ALeba.1
Associate II

Background:

I'm trying to bring up a custom board with an STM32MP157D and DDR3. When I tried flashing the BSP, I got an error: "ERROR: DDR addr bus test: can't access memory @ 0xc0000004". I decided to try using STM32DDRFW-UTIL to test the DDR before proceeding. I downloaded the code and compiled and debugged the project for an STM32MP157C-DK2. The image sucessfully loaded via the ST-Link in engineering mode and I saw the UART with the expected DDR tool interface. My custom board does not have an ST-Link connection, so I was going to try to flash the image into sysram using USB. I'm still working with the DK2 as a proof of concept.

Issue:

When I try to flash the image using STM32_Programmer_CLI, the utility does not start. I am using the binary in the Binaries folder of STM32DDRFW-UTIL and trying to flash it with "STM32_Programmer_CLI -c port=usb1 -d STM32MP157C-DK2_DDR_UTILITIES_A7.stm32 0x01 -s 0x01". I get the following output and nothing on the UART:

-------------------------------------------------------------------
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 : 002000203338510634383330
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: STM32MP157C-DK2_DDR_UTILITIES_A7.stm32
File : STM32MP157C-DK2_DDR_UTILITIES_A7.stm32
Size : 61.22 KB
Partition ID : 0x01

Download in Progress:
[==================================================] 100%

File download complete
Time elapsed during download operation: 00:00:00.461

RUNNING Program ...
Address: : 0x1
Error:
Unable to reconnect the target device: time out expired
Error: Start operation failed

 How can I get this working? For reference, I'm running this on Linux.

 

Thanks for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
ALeba.1
Associate II

I've figured it out!

It looks like something that was previously fixed, but a commit two months ago wiped out the fix:

Here's the change that got wiped out from Scripts/imageheader/postbuild_STM32MP15.sh:

ALeba1_0-1724679805753.png

By adding this change back in, the file loads into SYSRAM successfully.

View solution in original post

1 REPLY 1
ALeba.1
Associate II

I've figured it out!

It looks like something that was previously fixed, but a commit two months ago wiped out the fix:

Here's the change that got wiped out from Scripts/imageheader/postbuild_STM32MP15.sh:

ALeba1_0-1724679805753.png

By adding this change back in, the file loads into SYSRAM successfully.