Philippe
There is no register containing the Flash size but you can test it as follows:
- try to read a byte/word from Flash at 0xfff0 - if it causes a hard fault (which you need to handle appropriately) it is < 64k, otherwise it is 64k
- repeat at 0x7ff0 - if it also fauts it is 16k or else it is 32k
Regards
Mark