SPI over DMA example?
Posted: Wed Jan 16, 2013 3:52 am
Hello!
So I've looked through the testhal and example code and maybe I just missed it but I am not seeing an example of how to send data with DMA over SPI. In the STORM example it looks like it's just doing a mem to mem copy.
What doesn't make sense to me is do I need 2 buffers? I see in the init code for SPI that it is in fact setting up the DMA stream associated with SPI2 as I would expect, I am just not sure how to send the data. My code I wrote doesn't do anything and I suspect it's because the destination is not setup right. With the DMA copy, do you still use 2 buffers (source and destination).
Any help appreciated!
Thanks!
Rick
So I've looked through the testhal and example code and maybe I just missed it but I am not seeing an example of how to send data with DMA over SPI. In the STORM example it looks like it's just doing a mem to mem copy.
What doesn't make sense to me is do I need 2 buffers? I see in the init code for SPI that it is in fact setting up the DMA stream associated with SPI2 as I would expect, I am just not sure how to send the data. My code I wrote doesn't do anything and I suspect it's because the destination is not setup right. With the DMA copy, do you still use 2 buffers (source and destination).
Any help appreciated!
Thanks!
Rick