SPI DMA Read/Write example
Posted: Sun Dec 23, 2018 6:29 pm
Hi, I just read SPI api-reference and looking for an example snippet of reading SPI data in DMA mode.
There is spi_master but it doesnt use DMA (doesnt it?) and just send, do not read any data. Things that are important for me:
- declaring memory for buffers (how, should I declare new buffer for each transaction?)
- cmd and addr variable length (should use only tx_buffer or change addr length dynamically?)
- what is length and rxlength? length is sum of rxlength and txlength?
There is spi_master but it doesnt use DMA (doesnt it?) and just send, do not read any data. Things that are important for me:
- declaring memory for buffers (how, should I declare new buffer for each transaction?)
- cmd and addr variable length (should use only tx_buffer or change addr length dynamically?)
- what is length and rxlength? length is sum of rxlength and txlength?