Hello,
RAM memory area, which is accessed by DMA should be set as cache inhibited. If you write to RAM using DMA and this part of memory is cachable, it should case some problem.
Please look at the PinToggleStationery example below. There are some functions in optimization.c file, which could help you to set MMU correct.
Example XPC567XRKIT PinToggleStationery CW210
There is also MMU configuration tool you can easily use
https://community.nxp.com/docs/DOC-331924
Please try and let me know, if it helps you.
Best Regards,
Martin