cancel
Showing results for 
Search instead for 
Did you mean: 

Programming to external flash on STM32U5A9J-DK fails after around 2.5 MByte. How to fix this?

JWill.11
Associate II

I'm using a STM32U5A9J-DK with TouchGFX. Smaller projects work just fine. But aufter integrating an Animated Image (approx. 37 MBytes of assets), the programming fails. The console log is as follows:

STMicroelectronics ST-LINK GDB server. Version 7.3.0
Copyright (c) 2023, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.13.0                  
      -------------------------------------------------------------------
 
 
 
Log output file:   ******************************
ST-LINK SN  : ******************************
ST-LINK FW  : V3J11M3
Board       : STM32U5A9J-DK
Voltage     : 1.79V
Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication
2nd connect tentative with frequency (8MHz)
ST-LINK SN  : ******************************
ST-LINK FW  : V3J11M3
Board       : STM32U5A9J-DK
Voltage     : 1.79V
SWD freq    : 8000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x481
Revision ID : Rev C
Device name : STM32U5xx
Flash size  : 4 MBytes (default)
Device type : MCU
Device CPU  : Cortex-M33
BL Version  : 0x92
Debug in Low Power mode enabled
 
      -------------------------------------------------------------------
        Choose flashing speed for Cortex M33 series.(default speed=Reliable)                  
      -------------------------------------------------------------------
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a17156.srec
  File          : ST-LINK_GDB_server_a17156.srec
  Size          : 37.26 MB 
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 38]
Erasing memory corresponding to segment 1:
Erasing external memory sectors [0 591]
Download in Progress:
 
 
Error: failed to download Segment[1]
Error: failed to download the File
Encountered Error when opening C:\ST\STM32CubeIDE_1.12.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.600.202301161003\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Shutting down...
Exit.

In the debug configuration, following external loader is specified:

MX25LM51245G_STM32U599J-DK.stldr

I tried to read out the memory using a J-Link with the JMem tool. There, I noticed, that after around 2.5 MByte, the content is filled with FFFF... The external flash should have 64 MByte.

Is there a way to fix this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
JWill.11
Associate II

I tried version 2.10 of the STM32CubeProgrammer, which worked now.

View solution in original post

11 REPLIES 11
JWill.11
Associate II

The memory location, where it stops flashing, is always the same (0x9026 BC00).

KDJEM.1
ST Employee

Hello @JWill.11​ ,

Thank you for reporting this issue.

I confirm the issue: External memory programming failed using a file with size bigger than 2.4MB using STM32CubeProgrammer v2.13.0.

Internal ticket number: 147448 (This is an internal tracking number and is not accessible or usable by customers).

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

KDJEM.1
ST Employee

Hi @JWill.11​ ,

Waiting for the next STM32Cubeprogrammer release, could you please use the STM32CubeProgrammer v2.12.0 version and check if the issue is solved.

I hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks. Can you provide me with a link to this version, as through the official ST page, one can't download version 2.11 and 2.12.

JWill.11
Associate II

I tried version 2.10 of the STM32CubeProgrammer, which worked now.

KDJEM.1
ST Employee

Hi @JWill.11​ ,

Glad to know that the issue is already fixed.

I will let you know when the issue is fixed in the next version.

Sorry for this inconvenience.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

https://community.st.com/t5/stm32cubeprogrammer-mcu/stm32cubeprogrammer-2-14-0-released/td-p/573439

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I use TouchGFX 4.22.0 to generate the UI code, use STM32CubeIDE 1.13.0 STM32CubeProgrammer v2.14.0 to flash my program into STM32u5a9j-dk, the issue still exists.

How did you switch back to STM32CubeProgrammer v2.10 from v2.13? Thanks.