I am trying to control my AD7689 codec through my BF592 via the SPI bus. I send the configuration code which should sequence automatically between channel zero and channel one (I am using stereo channels rather then the full capability of 8). I wrote the 2D DMA code which should sort the stereo input channels in the correct fashion. When using the plot in debug window, I see random data in my DMA buffer.
Attached is the code for the 2D DMA, I would really appreciate it if you could point out when I am going wrong.