FlexNVM as EEPROM is Slow

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

FlexNVM as EEPROM is Slow

559 Views
benjaminschroed
Contributor III

Hello,

I'm currently working on a project where we plan to use FlexNVM as EEPROM with a K61.  We are not writing huge amounts of data, but maybe something like 16 bytes every time 60 seconds has passed.

What I'm noticing is that if I time how long the EEERDY flag takes to set within FCNFG after every write.  It can take up to 667 microseconds, and this is per 32-bit write.

We currently are running in a real-time scheduler, and this is obviously not easy to schedule.  We could queue everything that needs to be written, and write it during slack/background time, but that is undesired if we can avoid it.

Anyone have any insight on how to speed this up, or have any novel improvements to what I'm trying to do?

Thanks

Labels (1)
Tags (1)
0 Kudos
2 Replies

413 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Benjamin Schroeder,

    What the flash frequency your are configuring?

   667 ms is too long, there may have some problem.

    When you do the eeprom write, please disable the global interrupt, and test it again.

   You can configure the flash frequency to 25Mhz.


Have a great day,
Kerry

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

0 Kudos

413 Views
benjaminschroed
Contributor III

We actually have the Flash clock configured for 25 MHz.  Also, I've been able to reproduce the problem while having the EEPROM code run in our highest priority interrupt (SysTick).  Since it cannot preempt itself, disabling global interrupts will have no effect.

I'll run a test where we don't have any interrupts enabled (including SysTick), and report back if that has any effect.

0 Kudos