Forum Discussion
Altera_Forum
Honored Contributor
13 years agothe align attribute will ensure the different buffers will not end up o the same cache line, but there could still be some parts of video_buf that are cached and you can get the wrong contents.
Try to callalt_dcache_flush ((void*)video_buff,769*sizeof(alt_u32));before the SGDMA transfer. This will write down the cache contents to video_buff, but most importantly will invalidate the cache for this area. That way you will be sure the cache won't interfere with the data. AFAIK Altera doesn't provide a macro to just invalidate the cache without flushing it, even if the instruction exists in assembly.