How to use flash memory?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use flash memory?

856件の閲覧回数
darwinagudelohe
Contributor I

Hi

I'm trying to read the flash memory of the KL25Z. I can program it correctly, I can view the information programed with the jlink, but i don't know how read it from the main program.

I'm using KSDK V2

any idea?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

724件の閲覧回数
mjbcswitzerland
Specialist V

Hi

The program flash in the Kinetis processor is memory mapped so the simplest method of reading from it is to just use pointers.
For example, to read 64 bytes from the addres 0x8000 do:


unsigned char mybuffer[64];
unsigned char *ptrFlash = (unsigned char *)0x8000;
memcpy(mybuffer, ptrFlash, sizeof(mybuffer));

Regards

Mark
Kinetis for professionals: http://www.utasker.com/kinetis.html

0 件の賞賛
返信