Skip to main content
Associate II
May 14, 2026 7:59 AM UTC
Solved

cube programmer shows 256 pages of 2K in a 256K mcu?

I am using a stm32 F103RCT6 mcu. It has 256 Kb of flash memory. But when i connect it to cube programmer, it shows there are 256 sectors of 2K size which equates to 512 Kb flash. 

I was even able to go to that last page and write data to it. so is the linker script generated by HAL wrong?

Akshat_codes__0-1778745508180.png

Akshat_codes__1-1778745517616.png

 

 

AScha.3
AScha.3Best answer
Super User
May 14, 2026 8:30 AM UTC

Nothing wrong here. :)

Just you got a F103 with full flash, 512K.  

Reason is: for the purpose of rationalized production only one die is produced , with 512K .

Testing the flash is "expensive" on the chip tester, so short test -> smaller flash tested -> cheaper version.

So you have a chip with 256K flash, tested and 100% working - as you ordered.

And there is more flash on the die, might work fine or not - you didnt pay for tested 512K .

So you can use it, but dont cry, if there is an error....

And linker script is ok, if 256K is used, as you ordered.

If you feel a post has answered your question, please click on " Best Answer ".

7 replies

Andrew Neil
Super User
May 14, 2026 8:07 AM UTC

@Akshat_codes_ wrote:

I am using a stm32 F103RCT6


Where did you obtain it?

Are you sure it is genuine?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate II
May 14, 2026 8:12 AM UTC

I ordered it from LCSC. Attached below is the image

Akshat_codes__0-1778746305694.jpeg

 

Andrew Neil
Super User
May 14, 2026 8:19 AM UTC

@Akshat_codes_ wrote:

I ordered it from LCSC.


You mean here: https://www.lcsc.com/ ?

Not an Authorised Distributor, so there is a risk it's fake.

 

Maybe this diagnostic can help you identify it ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
AScha.3
AScha.3Best answer
Super User
May 14, 2026 8:30 AM UTC

Nothing wrong here. :)

Just you got a F103 with full flash, 512K.  

Reason is: for the purpose of rationalized production only one die is produced , with 512K .

Testing the flash is "expensive" on the chip tester, so short test -> smaller flash tested -> cheaper version.

So you have a chip with 256K flash, tested and 100% working - as you ordered.

And there is more flash on the die, might work fine or not - you didnt pay for tested 512K .

So you can use it, but dont cry, if there is an error....

And linker script is ok, if 256K is used, as you ordered.

If you feel a post has answered your question, please click on " Best Answer ".
Andrew Neil
Super User
May 14, 2026 8:33 AM UTC

but shouldn't CubeIDE CubeProgrammer recognise the chip from its ID, and only report the specified memory sizes ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
AScha.3
Super User
May 14, 2026 8:51 AM UTC

Maybe, if different ID is written to chip, but basically is same die for c-d-e flash size:

AScha3_0-1778747908824.png

vs.

connect a H743ZG  , 1MB flash (but die has 2MB :(

AScha3_1-1778748371625.png

and all are 450 die :

AScha3_2-1778748505504.png

But obviously here something written to the chip, to disable dual core, flash size info, etc.

So i tried using the 2MB flash - and yes, its there - but not tested, as ordered version has 1MB.

+ here connect to H743ZI , 2MB  , ordered:

AScha3_3-1778748900259.png

2MB verified.

If you feel a post has answered your question, please click on " Best Answer ".
Associate II
May 14, 2026 9:27 AM UTC

ok thanks for the response.