I have a number of arrays that are going to get stored on an external FLASH IC.
Important info about how the data is read:
- The data from each array is read in ascending index order. So I might read index 0, 1, 10, 12... but never 0, 1, 12, 10.
- The arrays are different in length.
- After the array was read to it's end, it starts all over again.
During normal operation, about 353,600 bytes will be read per second from the FLASH to the MCU. With SPI Clk @ 4MHz this would take 88.4msec which leaves time for the MCU do to other things.
In fact there's a command byte + 3 address bytes on top of every transfer. This overhead makes the said transfer unrealistic.
Most of these SPI FLASH devices, such as the W25X40CLSVIG TR I'm about to use, have a hardware feature called hold. One can halt the transfer and resume it without having to re-send a commands & address.
If we'll assume there're 10 arrays, one could arrange the data on the FLASH like so:
array0 ,array1..., array9, array0, array1...
This would solve some of the issues because I'll have a much lower overhead, but after the 1st pass of the shortest array I'll be facing the same problem again.
Does anyone have a suggestion how to implement a solution that might make the transfer possible?