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
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!
-----------------------------------------------------------------------------------------------------------------------
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.