Hello,
I have a project that need to persist some data (1 or 2 bytes) during restarts/reboots/resets. It is a configuration information that can be changed during runtime by the user.
Is it possible to share the booitloader ROM space for that or use the flash?
If so, is there any application note or example code that I can look at?
Thanks
Solved! Go to Solution.
Hi,
Please download C90TFS_FLASH_DRIVER(TFS Flash Driver Software for Kinetis and ColdFire+ MicroControllers) from here, which includes the KL46 product Flash erase/program operation (customer could refer to storage some data to Flash memory).
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
Please download C90TFS_FLASH_DRIVER(TFS Flash Driver Software for Kinetis and ColdFire+ MicroControllers) from here, which includes the KL46 product Flash erase/program operation (customer could refer to storage some data to Flash memory).
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Just one last question, how do I read back the data stored ??
Do I use FlashReadResource ??
Hi,
Read data from Flash memory just like read a data from a dedicated address, please refer below code as an example:
//from flash address 0x1000, read 16 bytes back
destination = 0x1000; // flash address 0x1000
#define BUFFER_SIZE_BYTE 0x10
UINT32 programvalue[BUFFER_SIZE_BYTE];
for (i = 0; i<BUFFER_SIZE_BYTE; i=i+4)
{
programvalue[i] = *((UINT32 *)(destination+i)) ;
printf("\n programvalue[%d] = 0x%4x \n", i, programvalue[i]);
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Hui_Ma,
Thank you very much.... I have tried your driver and it works great !!
Regards,
Thiago
Hi
Any Flash sector can be used to save updateable parameters to (as long as the same sector is not used for code).
See http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF
See also µTasker FRDM-KL43Z support - parameters can be modified and saved to Flash using the command line menu.In the "I/O menu" flash reads, writes and deletes can be experimented with.
Regards
Mark
Kinetis: µTasker Kinetis support
KL43: µTasker FRDM-KL43Z support / µTasker TWR-KL43Z48M support
For the complete "out-of-the-box" Kinetis experience and faster time to market