cancel
Showing results for 
Search instead for 
Did you mean: 

Hidden Flash in STM32L431KB?

VChav.19
Associate II

According to the datasheet the STM32L431KB has 128kb of memory. I forgot about this fact and in my linker script I added another section after  0x08020000 of 6 KB long.

After debugging and testing my code I am sure that I can read/write on flash above the limit which should be  0x08020000 (128kb).

So my question is why is my program working ? and is there a hidden section which was not removed in production since there is a256kb version for the L4 family.

2 REPLIES 2
Danish1
Lead II

When silicon chips are made, it is possible that a speck of dust will land somewhere on the chip and that part of the chip won't work. Bob Pease, at the time of the Intel Pentium, reckoned that half of all microprocessors chips made around then would fail production tests and have to be scrapped.

A big part of an stm32 microcontroller is the FLASH memory. To allow ST to still sell a chip that has part of its FLASH faulty, they have a way to map-away the bad region and sell it as a part with a smaller amount of FLASH memory at a slightly lower price. But in order to save transistors, they might not make that bad FLASH totally inaccessible - just put it somewhere the data-sheet doesn't say there's good FLASH.

If the small-FLASH part turns out to be very popular, ST might decide to produce a new mask-set and actually make parts with less FLASH than the largest-FLASH part.

Due to the random nature of these failures, it might be that ST have more microcontrollers with the FLASH being all good than there is demand for, so they might sell some of them as if they only had smaller FLASH. But it might also be that their tests raise suspicion that some of the FLASH will not last for the full lifetime specified in the datasheet, so even though the extra FLASH programs OK now it might fail in the field.

So you might find your small-FLASH part has extra FLASH. But you shouldn't rely on a small-FLASH part having full-size working FLASH.

Regards,

Danish

Uwe Bonnes
Principal II

If STM32L431KC and STM32L431KB have the same MCUID, they are produced as the same die. Upper Flash is on the chip, either blocked by some fuse, probably not tested or tested bad. You can try to use, but on your own risk w/o any guarantee