I have a problem with using sst25wf040 driver. When flash programmer runs it, write operations go about 20 times faster than when I run it as a part of my application. It's an LwIP application, so several issues may come from that. I tried to eliminate possible reasons, like placed all flash driver code in internal memory as well as data to write, then disable interrupts using cli() function, also played with code/data cache. None of this took an effect. Finally, I stepped up the processor frequency and enabled optimization for speed and that was a right thing to do. It let the application complete writing one sector within a second instead of 20. Virtually, I'm satisfied with this result, but the question still stands. Why the same piece of code runs about 20 times faster in driver project without any optimization than in LwIP application at the same processor speed?
Could you please help me to figure that out?
Thanks in advance