How to use flash memory?

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

How to use flash memory?

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

734 次查看
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 项奖励
回复