MC56F83769 - Reading SPI Using DMA

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC56F83769 - Reading SPI Using DMA

234件の閲覧回数
dino_ct
Contributor I

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

0 件の賞賛
返信
3 返答(返信)

188件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

 

xiangjun_rong_0-1732529037447.png

For MC56F83xxx, the SPI0 Receiver slot is 12, the SPI1 receiver slot is 14

xiangjun_rong_1-1732529223686.png

 

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

0 件の賞賛
返信

204件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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.

xiangjun_rong_0-1732513453868.png

 

You can download SDK from the website:

https://mcuxpresso.nxp.com/en

Hope it can help you

BR

Xiangjun Rong

 

107件の閲覧回数
dino_ct
Contributor I

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 ).

0 件の賞賛
返信