2020-09-04 05:54 AM
Hello,
we are using various STM32F103 derivatives in several products. So far, we never had any problems reading out the flash memory size from the factory-programmed register at 0x1FFFF7E0.
Currently, we are using the STM32F103R4 device (photo attached), and here reading the memory size yields 0xFFFF instead of the expected value of 0x0010.
The errata sheet does not mention anything, and since this value is declared "factory programmed", I think it might rather be a problem of NOT being factory programmed indeed... :(
Any information about how to solve that problem, and/or how to identify the memory size at run-time, is greatly appreciated.
Thanks & regards,
Tilmann
2020-09-04 12:42 PM
I've seen this reported for chips of unknown origin and have read it means the chips were not intended for the end-user. Did you buy these from a reputable supplier? I've also seen reports where the value in the flash size register was not consistent with the datasheet.
Not sure what else you can do to solve it except for hard-coding the flash size.
2020-09-04 05:12 PM
2020-09-05 07:17 AM
Many thanks for your answers.
We do not buy chips from any obscure sources, only from the official distributors.
These boards were produced several years ago, and all performed well since then (in real industrial equiment). But when we applied a new firmware update that (now) uses the flash size information, we found this to be invalid in at least a few of the chips. Maybe some more of that run are out there in the field...
Even if we find out the exact supplier from our document archive, I fear we won't get much help from there after that long time (particularly since we are not talking about large volumes).
Maybe the only thing we can do indeed is assuming a value of 0x0010 in case 0xFFFF is found...
2020-09-05 08:36 AM
This is a primarily user-driven forum, so we can only guess here, have no more info than you. You may want to contact ST directly, through web contact form or through FAE.
As there are no 'F103 with less than 16kB of FLASH, assuming it's just that much certainly errs on the safe side.
JW