Hi NXP,
I am using MC56F83768 microcontroller and I want to use DMA to read data from SPI0, which is configured as a slave and only receives data. Is there any code example? Also, to set a proper SOURCE in DMAMUX, I need to know DMA request sources (slot numbers) for peripherals, which I couldn’t find in the MC56F83xxx Reference Manual.
Thanks
Hi,
You can use any DMA channel to transfer data from SPI0 receiver data reg to memory(array). For example, you use DMA channel 7
For MC56F83xxx, the SPI0 Receiver slot is 12, the SPI1 receiver slot is 14
You can write
*CHCFG7=1<<7|12; //for SPI0 receiver;
*CHCFG7=1<<7|14; //for SPI1 receiver;
Hope it can help you
BR
XiangJun Rong
Hi,
I suppose that the SDK example has the code to use DMA to transfer data between SPI and memory, if this example uses spi master mode, you can modify the mode from master to slave.
You can download SDK from the website:
Hope it can help you
BR
Xiangjun Rong
Hi,
Thanks for your suggestions and apology for some delayed response – I was out of office for a few days.
I looked at driver examples for queud_spi and, actually, they cover both cases: master and slave spi. So, with some ideas from those examples and digging into the microcontroller’s manual, I got it working. I believe I should be all set (for now ).