KEA64 get flash size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KEA64 get flash size

Jump to solution
857 Views
philippetrudel
Contributor I

Hi all,

I am using the KEA64 family and I am wondering if it is possible to get the flash size of the MCU at runtime?

Thanks,

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
731 Views
mjbcswitzerland
Specialist V

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

View solution in original post

1 Reply
732 Views
mjbcswitzerland
Specialist V

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