ECSPI using DMA as master and slave

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ECSPI using DMA as master and slave

Jump to solution
1,301 Views
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

Labels (2)
0 Kudos
1 Solution
896 Views
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 ;-) )

View solution in original post

0 Kudos
3 Replies
896 Views
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 Kudos
897 Views
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 Kudos
896 Views
CarlosCasillas
NXP Employee
NXP Employee

Hello Peter,

Thanks for sharing your solution with the Community!

Best regards!

/Carlos

0 Kudos