How to read flash memory?

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

How to read flash memory?

跳至解决方案
8,343 次查看
pengliang
Contributor III

Hi everyone,

I write data to flash memory(eeprom emulation) using FRDM-KL25Z. however, I want to check what data I wrote(since I dont have LCD). Is there a way to check the data that I wrote using codewarrior IDE?

Thanks in advance

标签 (1)
0 项奖励
回复
1 解答
2,985 次查看
pengliang
Contributor III
0 项奖励
回复
6 回复数
2,985 次查看
亚男张
Contributor I

I'm still confused about writing into the flash, the FLASH1Pointer should be what ?  and in the  Erasing Flash sectors in KL25 on the Freedom Board. the user memories area setting is grey, and in cw10.5 the flash_ldd component doesn't have a FLASH1_GetOperationStatus function?

0 项奖励
回复
2,985 次查看
kendang
Contributor I

I try the same thing on FRDM-KL25Z board. I use processor expert bin FLASH to create basic read and write function.

Only one thing I still confuse is absolute flash address to write to. Processor expert set in FLASH property address 0 that does make sense?? any idea? How did you set address to write in Flash of KL25Z ?

I can try and give you my result.

Thanks for any share information?

0 项奖励
回复
2,986 次查看
pengliang
Contributor III
0 项奖励
回复
2,985 次查看
vfilip
NXP Employee
NXP Employee

Hello,

regarding PEx, this link could help:

EEPROM use with processor expert and K20

best regards

Vojtech Filip

Processor Expert Support Team


0 项奖励
回复
2,985 次查看
kendang
Contributor I

Thanks for information. I believe I am not alone try to implement EEprom emulation on Kinetis.

With K20 that has Flex memory it seems not to difficult to do it. How about KL ?

We accepted to use KL15 with 128K to use in current product. The only one thing holding me is implementing EEprom on the new chip.

Is there anybody ever did it on KL ?

I appreciate any your help

Ken dang

Escort Manufacturing Corporation

0 项奖励
回复
2,985 次查看
LuisCasado
NXP Employee
NXP Employee

Hi.

You can use Processor Expert to read and write the flash:

Read:

 

FLASH1_Read(FLASH1Pointer,0x1F000, &savedData, sizeof(savedData));

do {

FLASH1_Main(FLASH1Pointer);

OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);

} while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

 

Erase:

void EraseFlash() {

FLASH1_Erase(FLASH1Pointer, 0x1F000, 1024);

do {

FLASH1_Main(FLASH1Pointer);

OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);

} while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

return;

}

 

Write:

void WriteToFlash(LDD_TData *FromPtr, LDD_FLASH_TDataSize Size) {

FLASH1_Write(FLASH1Pointer, FromPtr, 0x1F000, Size);

do {

FLASH1_Main(FLASH1Pointer);

OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);

} while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

return;

}

Best Regards,

0 项奖励
回复