FlexRAM as EEPROM

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

FlexRAM as EEPROM

Jump to solution
2,103 Views
jorged_avila
Contributor II

I intend to use the Kinetis FlexNVM/FlexRAM as EEPROM, but reading the documentation raised a question:
The Freescale text says, textually: "Writes to the EEE space launch a EEE operation to store the data within the E-flash memory".

Ok, fine. I write to the FlexRAM, the hardware automatically launches the store algorithms, chooses the appropriate area in Flash, and stores it. Great! But...

If I need to change a larger area - say, 4 32-bit word in sequence - Do I need to write each one, wait for the hardware to finish the store process and them write the next one? It doesn't seem practical, especially because this would mean writing 3 un-needed intermediate records to flash.

Some external flash memories work like that, but they use a "time out" - that is, you write several data, and after you stop for some time (usually some micro seconds) they launch the recording process.

Did I miss anything in the documentation?

Thanks for any light shed on this!

Labels (1)
1 Solution
1,017 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Jorge d'Avila:

Actually your understanding is correct. You need to wait for the EEERDY bit to set after each longword (32-bit) write operation. For reference on the timings give a check to your device datasheet.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
1,017 Views
mevon
Contributor II

Hello,

Maybe I'm not posting in the right subject but I would like to have more help on the subject of FlexRAM as EEPROM. I am using a K20DX256 and Kinetis Design Studio (KDS) and I would like to use the FlexRAM + FlexNVM + EEEController to store some data with endurance as a normal EEPROM would be.

From AN4282 : Using the Kinetis Family Enhanced EEPROM Functionality :

“How FlexMemory EEE works

To provide enhanced EEPROM functionality, the FlexMemory uses a RAM block (FlexRAM), a flash

block (FlexNVM), and EEE state machine. When the EEE functionality is enabled, the FlexRAM becomes

your EEE memory. The FlexRAM address space is where you access all of your EEE data. When the EEE

is accessed, the EEE state machine keeps track of the data and backs it up as data records, stored in some

portion of the FlexNVM used as an E-flash. Using a large block of E-flash to back up the data for a smaller

amount of EEE data allows the FlexMemory EEE implementation to offer extremely high endurance.

My guess is I need to access the FlexRAM to access the FlexNVM and from the Reference Manual,  FlexRAM address range = 0x1400_0000 – 0x1400_07FF.

I think I have all the bits configured right in the CPU component of Processor Expert regarding the Flex Memory Settings and the configuration of the ROM/RAM areas in the Build Options tab too.

My trouble resides in the way of writting and reading the data in the FlexRAM, anyone has a clue on how to proceed? And if there are PExp componants already made for this purpose?

Thanks in advance,

MH

1,018 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Jorge d'Avila:

Actually your understanding is correct. You need to wait for the EEERDY bit to set after each longword (32-bit) write operation. For reference on the timings give a check to your device datasheet.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,017 Views
jorged_avila
Contributor II

Thanks, Jorge!

Then it is not a good practice to use this feature for larger amounts of configuration data, is it? You would generate a new "backup copy" of your record for each 32-bit word written!  Better to use normal flash operation!

1,017 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Yes I think it would be better to use standard flash for large amounts of data, as long as you do not change that data very often, due to the lifetime and programming cycles of the memory.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------