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?
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?
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
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,