I would like to share an example project for FRDM-KL25Z board on which C90TFS Flash Driver was included to implement emulated EEPROM (Kinetis KL25 doesn’t have Flex Memory).
It is based on the “NormalDemo” example project. A string of bytes is stored on the last page of the flash memory (address 0x1FC00-0x1FFFF), and then, it is overwritten with a different string.
The ZIP file also includes the “Standard Software Driver for C90TFS/FTFx Flash User’s Manual” document. For more information, please refer to Freescale website and search for “C90TFS” flash driver.
Hope this will be useful for you.Best regards!
Thanks for sharing this:smileyhappy:
Good document and code! Thanks for your sharing!
same example but using the IAR tools..please.
Last version of C90TFS drivers could be downloaded from here and IAR examples are included.
Can you please provide an specific demo for the KL02. I'm not sure how to use the driver with the KL02.
Thank you in advance,
Another way to realize that would be using PEx. Please have a look at THIS Erich's post on MCUonEclipse.
Hope that helps,
Can PEx be used with IAR IDE? or is it only for CW. And if yes then how do you use PEx with IAR.
Yes, PEx can be used with IAR, see http://mcuoneclipse.com/2013/01/31/tutorial-iar-freertos-freedom-board/
I've been trying to test you code in KDS but on line 80:
I get an error, probably an exeption due to a mistake in my linker file related to the __ram_for_command_sequence_func variable.
Have you migrated your project to KDS?
Look forward to your answer.
We don't have examples on KDS; the C90TFS demos are on CW and IAR only.
I tried this code and modified to work in a FRDM-KL46Z, and it works, but at first I was getting the same issue, and i was unable to compile it:
FRDM-KL46Z_EEPROM_Emulation_Test01\Debug/../Sources/NormalDemo.c:149: undefined reference to `__ram_for_command_sequence_func'
collect2.exe: error: ld returned 1 exit status
make: *** [FRDM-KL46Z_EEPROM_Emulation_Test01.elf] Error 1
I fixed changing the declaration type, for instance:
extern uint32_t __ram_for_command_sequence_func;
Now it is working on my FRDM-KL46Z, and of course i change the MCU header file from the MKL25 to the MKL46 to make it work properly.