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 :) )
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 :) )