Skip to main content
AMT
Associate
September 20, 2021
Solved

STM32CubeProgrammer v2.8.0 detects the wrong flash size for the STM32L152VDT6X causing the programming to fail

  • September 20, 2021
  • 7 replies
  • 5672 views

The STM32L152VT6X has 384KBytes of flash memory, but the STM32CubeProgrammer detects the flash size as being 128KB. When I try to flash an image of ~170KB it fails with the error "Operation exceeds memory limits". When I flash the same image with the STLINK Utility it flashes successfully.

The first image is from the stlink utility and the second is from STM32CubeProgrammer

0693W00000DnnbRQAR.png0693W00000DnnbGQAR.png

This topic has been closed for replies.
Best answer by Houda GHABRI

Hello @AMT​ ,

This issue was fixed in another L1 family (L1 have many device ID) , in next release it will be fixed also for 0x436 device ID .

In meanwhile, to solve the problem I attach the modified STM32_Prog_DB_0x436.xml file with correct value .

Can you please replace the xml file in your database : STM32CubeProgrammer_2_8_0\Data_Base\STM32_Prog_DB_0x436.xml by this one and tell me if it is Ok?

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Houda

7 replies

TDK
Super User
September 20, 2021

Known issue:

https://community.st.com/s/question/0D53W000008kLHnSAM/stm32cubemx-cant-recognize-the-flash-size-correctly-and-the-debugger-wont-start

The issue was reported as fixed in v2.8.0 by @Houda GHABRI​ (but it doesn't appear to be fixed).

"If you feel a post has answered your question, please click ""Accept as Solution""."
AMT
AMTAuthor
Associate
September 20, 2021

The issue still exists, I tested with v2.8.0 on Linux. See screenshot.0693W00000DnqVuQAJ.png

Piranha
Principal III
September 20, 2021

Putting 2 and 2 together is not a simple task. It's only more than a year since the bug was reported and they have tried to fix it only two times!

Houda GHABRI
Houda GHABRIBest answer
ST Employee
September 21, 2021

Hello @AMT​ ,

This issue was fixed in another L1 family (L1 have many device ID) , in next release it will be fixed also for 0x436 device ID .

In meanwhile, to solve the problem I attach the modified STM32_Prog_DB_0x436.xml file with correct value .

Can you please replace the xml file in your database : STM32CubeProgrammer_2_8_0\Data_Base\STM32_Prog_DB_0x436.xml by this one and tell me if it is Ok?

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Houda

herca.1
Associate II
October 1, 2021

When will be the next release? When will we be able to debug in CUBE IDE? Do you have a rough estimation?

Houda GHABRI
ST Employee
September 21, 2021

Please find the STM32_Prog_DB_0x436.xml file fixing the issue

UKhan.2
Associate III
March 1, 2022

Seems like the same issue exists for STM32F7508-DK, Is it fixed across the board for all devices or shall I need to have a file added to the DB?

Tesla DeLorean
Guru
March 1, 2022

Apt to be device unique. It is suppose to read the "FLASH SIZE" memory location in the OTP/SYSTEM area which burns in the size of flash tested. The die likely has the full complement, just untested, but probably fine.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Souan.1
Visitor II
September 28, 2021

im on windows , where do you replace this file? , i only have an application file . can you please post screenshots on how to do it?

Tesla DeLorean
Guru
September 28, 2021

Going to be in one of the Program Files sub-directories, or wherever you chose for the install directory.

Guess something like:

C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Data_Base

Break out the file manager.. Perhaps open a command console with Admin Rights so you can change the files.

Alternatively UNINSTALL the tools, and then reinstall at a different directory within your user space you can access/modify.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Houda GHABRI
ST Employee
October 8, 2021

Hi @senge​ ,

Ok I will check and come back with updates soon.

Houda

EOng.2
Visitor II
February 28, 2022

Can I have the file and method to increase the flash memory for STM32L031K6 using the STM32cubeprogrammer.

Tesla DeLorean
Guru
March 1, 2022

What's the issue with the STM32L031K6?

The die only has 32KB of FLASH, as I recall

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