eeprom emulation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eeprom emulation

617 Views
barbercolman
Contributor III

Hi

I am looking at doing kinetis family on the k60.

 

First question is during development if I need to reporgram the part will all flash be cleared?

 

Second in the flashx_twrk60n512 demo the linker files showes in the project fiew. Where is it in the TWR-K60N512_Quick_Start_Demo project?

 

What is the minimum sector size. My understand is I have to read the minimum block size to ram, modify it and write it back to flash.

Is this correct. Also is there an app mote?

0 Kudos
2 Replies

336 Views
KJFPE
Contributor III

Hi
In answer to your first question if you want to create an EEPROM in memory you need to edit your icf file with something like this below.

 

Note the placement section because if you don’t place at the end then as your program grows your EEPROM will move and you will lose your EEPROM data


The EPPROM has 8 sectors 0 to 7 and for some reason you cannot write to sector 0 normally this is where the device information is stored on a “real chip”

 

define exported symbol __FLASHX_SECT_SIZE = 0x800;
define block FLASHX_POOL with alignment = __FLASHX_SECT_SIZE { section .flashx };

 

// Initialise
do not initialize { section .flashx };
keep { section .flashx };

 

// Placement
place at address mem:__ICFEDIT_region_ROM_end__ - 0x04800 { block FLASHX_POOL };


I hope this is off some use

336 Views
barbercolman
Contributor III

Thanks I will look in to it. Most of my work was with a 51jmevb and the linker .lcf file was listed in its own virtual folder under gpio_m51jmevb. Where is the linker file for the gpio_m51jmevb. If it is there I do not see it.

Thanks

0 Kudos