Forum Discussion
Altera_Forum
Honored Contributor
14 years agouse descriptor chain in SGDMA
Hi all My current goal is to use SGDMA (ST-to-MM) to transfer video data to a memory. Later on, I'll replace the memory by PCIE IP. My problem is how to use descriptor chain in SGDMA. ...
Altera_Forum
Honored Contributor
14 years agoare your ctrl_bug and video_buf tables local or global variables? If they are local then they are on the stack. And in that case, as the stack is also used for other local variables, it is possible that the data cache, holding memory contents before the SGDMA transfer, is flushed back to memory after the transfer, overwriting the new contents with the old.
Using the stack for uncached memory areas can be very tricky, and should be avoided if possible. Try to use either global variables or buffers allocated with malloc() (or even better, use alt_uncached_malloc() and then you can directly access the table contents without having to use IORD).