How to read flash memory?

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

How to read flash memory?

ソリューションへジャンプ
7,838件の閲覧回数
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,480件の閲覧回数
pengliang
Contributor III
0 件の賞賛
6 返答(返信)
2,480件の閲覧回数
亚男张
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,480件の閲覧回数
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,481件の閲覧回数
pengliang
Contributor III
0 件の賞賛
2,480件の閲覧回数
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,480件の閲覧回数
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,480件の閲覧回数
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 件の賞賛