Hi all,
I'm currently implementing SPI through DMA on a K22. I have everything working except for the reads. I can see SOUT, SCK, CS, and SIN all working on my oscilloscope, but the DMA handler seems to be popping bytes out of the POP register in the wrong order. Basically, I can send the slave [0x12, 0x34, 0x56] and see the same echo back on the bus, but what shows up in my read array is [0x00, 0x12, 0x34] while I can peak at the POP register and see 0x56 sitting in there, never getting popped out and into my read array. I figure there must be some simple setting that's configured incorrectly, but I'm having some trouble wading through the config bits and finding which ones may have something to do with what I'm seeing.
In short, I expect the function to be "read > pop > read > pop > read > pop", but it seems to be going "pop > read > pop > read > pop > read" and just leaving that last read in the register. Would anybody be able to shed some light on any config parameters relevant to this issue?
Thanks,
Daniel