KEA64 get flash size

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KEA64 get flash size

跳至解决方案
859 次查看
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,

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
733 次查看
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

在原帖中查看解决方案

1 回复
734 次查看
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