OpenDGPS / zynq-axi-dma-sg

Simple C snippet to transfer DMA memory with scatter/gather on a Zynq 7020
52 stars 28 forks source link

Pointers to data from mmap not volatile #6

Open larspontoppidan opened 4 years ago

larspontoppidan commented 4 years ago

The pointers to data from mmap must be declared volatile, otherwise there is no guarantee in what order writes or reads will happen. Seemingly inconsequential changes to the code may make or break correct function if these pointers are not volatile.

(Btw. I just want to say thanks for the code, it helped me tremendously to get the DMA working, but this issue was a real pain :) )