ECSPI using DMA as master and slave

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ECSPI using DMA as master and slave

跳至解决方案
1,421 次查看
peterw
Contributor III

Hello everyone,

Trying to get the ECSPI running with the DMA I get stuck.

Just a short overview. I am using two imx6q processors which should share data via the SPI (SPI5 CS1).

First of all I tried the example of the SDK which uses the loopback test function. This works fine.

Now I want to define one processor as master and the other one as slave. So far so good.

But I don’t get the desired result. Just add a screen of the logic analyzer which I use as sniffer between both processors. SPI_MASTER_SLAVE_DMA.JPG

The dummy data is received by the slave correctly. But transmitting from the slave fails. It seems that the master does not receive any data.

The configuration of the master:

CONREG: 0x01F4 7829 (EN, SMC, CM = 2, POST = 8, PRE = 7 CS = 1, BL = 0x1F)

CONFIGREG: 0x0000 0200

INTREG: 0x0000 0000

DMAREG: 0x0083 00A0

STATREG: 0x0000 0003

The configuration of the slave:

CONREG: 0x01F4 0001

CONFIGREG: 0x0000 2200

INTREG: 0x0000 0000

DMAREG: 0x0083 00A0

STATREG: 0x0000 0003

Thanks for any hint.

Peter

标签 (2)
0 项奖励
回复
1 解答
1,016 次查看
peterw
Contributor III

Solved!

Also the Daisy of the chip select was different. Adjusting that + removing the SS_POL bit from the slave, everythink works fine. (until now ;-) )

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,016 次查看
peterw
Contributor III

Update:

The first problem is solved ;-)

I can receive data from the slave via DMA. It was a fault in the IOMUX of my configuration. The SPI5 of the imx6 has ha Daisy register which has to configure different.

Now I can receive a part of the dummy data. Like in the screenshot.

SPI_MASTER_SLAVE_DMA2.JPG

The first 2 words are not transmitted from the slave to the master. Only the last 2 words are received correctly from the master.

Any suggestions?

0 项奖励
回复
1,017 次查看
peterw
Contributor III

Solved!

Also the Daisy of the chip select was different. Adjusting that + removing the SS_POL bit from the slave, everythink works fine. (until now ;-) )

0 项奖励
回复
1,016 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hello Peter,

Thanks for sharing your solution with the Community!

Best regards!

/Carlos

0 项奖励
回复