Speed of NAFlashRead

I use NAFlashRead in a loop to find the end of the written data in flash. a) hen I start the app with the RAVEN-Debugger I to don’t have to wait. b) But when I put image.bin to flash and start from there, it works but very slow. (10 bytes in a second…) Is there anything different in the Flash-Api in those 2 modes? I wondered whether I could change the priority of the Flash-Api. Code: while (!ret && a[0]!=0x0ff){ printf(“%s”, a); offset++; if (NAFlashRead(sector, offset, 1, a) != NAFLASH_SUCCESS) ret=40; } Kind regards, Christoph

It seems you are using the flash version of the image. This means all code is executed from ROM. This is a lot slower than RAM. Although 10 bytes pr second sounds way slower than I would ever imagiane. I have 2 suggestions you could try. 1: Use the compressed version of the program. That way the code will first be copied to RAM and run from there. 2: Perhaps you can enable the cache for this area? Should also speed up the code a lot