Hello all.
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!
/Carlos
Hi,
Last version of C90TFS drivers could be downloaded from here and IAR examples are included.
Best regards!
/Carlos
Hi David,
Another way to realize that would be using PEx. Please have a look at THIS Erich's post on MCUonEclipse.
Hope that helps,
Antonio
Yes, PEx can be used with IAR, see http://mcuoneclipse.com/2013/01/31/tutorial-iar-freertos-freedom-board/
Hello Carlos,
I've been trying to test you code in KDS but on line 80:
WRITE8(flashCmdTo, value);
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.
Kindest Regards,
Carlos
Hello Carlos,
We don't have examples on KDS; the C90TFS demos are on CW and IAR only.
Best regards!
/Carlos.
Hi Guys
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:
Before:
#ifdef FLASH_TARGET
extern uint32_t __ram_for_command_sequence_func[];
#endif
After:
#ifdef FLASH_TARGET
uint32_t __ram_for_command_sequence_func[];
#endif
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.