FlexNVM as EEPROM is Slow

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FlexNVM as EEPROM is Slow

617 次查看
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

标签 (1)
标记 (1)
0 项奖励
2 回复数

471 次查看
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 项奖励

471 次查看
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 项奖励