AnsweredAssumed Answered

Can I rely on a unused FLASH register bit remaining unused?

Question asked by John Smith on Aug 10, 2017
Latest reply on Aug 10, 2017 by Clive One

I'm using a STM32L433CCU6 and due to some bad maths on my part, have shipped code to production that attempts to erase flash pages incorrectly.

 

The error is that instead of erasing page number n, I'm erasing page number n+128. The chip I'm using only has 256KB of application flash so actually only has 128 pages of flash all up.

 

Because of some dumb luck, this is actually working as the most significant bit of the flash page number in the PNB register seems to be ignored. See the image below that I took from the datasheet. 

 

 

My question is can I rely on this working for this chip in the future? It's an easy change in my firmware to be sure, but a product recall is not so easy! Is it possible that the 10th bit will be used for something in the future, or will it effectively be a "do not care" bit forever, making my code functionally correct even if it is logically incorrect.

 

Thanks for your time,

 

John.

Outcomes