This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hello
I can use spi with spislave demo of cc3235modsf. then i want to use spi slave with dma.
i read SPICC32XXDMA.h and SPICC32XXDMA.c , but i do not know how to use it.
i use system_config to config spi interface.
in the spislave demo, the spi config step is follows
1: void SPI_init(void);
2: void SPI_Params_init(SPI_Params *params);
3: SPI_Handle SPI_open(uint_least8_t index, SPI_Params *params); here index is my spi config name
4: SPI_transfer(SPI_Handle handle, SPI_Transaction *transaction);
then the the spi dam config is follows
1: SPICC32XXDMA_init(SPI_Handle handle); the "handle" where to get , here spi is not open
2: void SPI_Params_init(SPI_Params *params);
3: SPI_Handle SPICC32XXDMA_open(SPI_Handle handle, SPI_Params *params); here red "SPI_Handle" ,where to get
4: bool SPICC32XXDMA_transfer(SPI_Handle handle, SPI_Transaction *transaction);
my question is:
1: where to use my spi config name with dma step ?
2: the dma config step is ok? where to use my spi configure name
3:how step to use spi with dma?
4: what is "SPI_handle handle" of dma step? where to get it ?
thanks
Hi,
The spi slave example already enables DMA by default. By using the SPI driver from the CC32XX SDK (which you seem to be doing), and enabling it from sysconfig, the DMA will operate and there is nothing to do from the application.
hello Sabeeh
thank you very much.
I do not find enable DMA in sysconfig in spi bar. my sysconfig is follow. is it enable in red block?
Yes, you can see the green checkmark. DMA is enabled. And in the SPI tab, you see min DMA transfer size. Whenever more than 10 bytes are transferred, the DMA will be used.