Hello,
In file legato_stream.c, seems that following condition prevent from using the cached buffer completely (thus causing extra reads)
Line 111
// requested data is in the local cache
if((uint32_t)addr >= stream->cache.baseAddress &&
(uint32_t)addr - stream->cache.baseAddress + size < stream->cache.logicalSize)
Need to change for following ?
(uint32_t)addr - stream->cache.baseAddress + size <= stream->cache.logicalSize)
Also, I am using a 16k cache buffer. Sometimes when iterating in the function leStream_Read the variable stream->cache.baseAddress seems to have been reseted to 0 in the middle of a transfer which causes to reload from external memory at some point where the cache buffer should still be used. Didn't find out for now.
Regards
Nicolas