Spi with dma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-07 7:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-07 10:17 AM
The buffer values are 32 bit. and the spi data register is 16 bit.
I don't think the SPI/DMA care what form the data is for the C compiler, it's just words in memory. I'd probably lean to doing 16-bit memory accesses, double the transfer count, and let it pull the 32-bit data as a pair of 16-bit half-words.the dma did not work.What does that mean? Transferred the wrong data, threw and error?Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-07 10:36 AM
DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)(&outpuf_pfc) ;
Where is output_pfc defined? Is it word aligned and the same size as buffer_count?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-08 3:22 AM
clive, i can do how you suggested.
what you mean by I don't think the SPI/DMA care what form the data is for the C compiler, it's just words in memory.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-08 4:42 AM
Packing and unpacking (converting 32 bit memory to two 16-bit SPI outputs) is performed in the DMA hardware using the DMA FIFO buffer. AS long as memory is aligned to the declared boundary (32 bit in this case) it won't matter what compiler you are using, memory location is the same.
