KEA64 get flash size

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
858件の閲覧回数
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 解決策
732件の閲覧回数
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 返信
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