imx6q ecspi slave mode

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

imx6q ecspi slave mode

ソリューションへジャンプ
2,096件の閲覧回数
andrewyerokhin
Contributor II

Hello everyone,

I'm trying to enable ecspi1 slave mode on imx6q, linux kernel version is 3.0.35. I used following patch:

i.MX6 ESPI slave mode support patch based on rel_imx_3.0.35_4.1.0

Everything works almost fine for 32bpw, except for one problem. First word of each message from IMX is 0x00000000, independent of what actualy was sent from IMX. I verified that spi driver on IMX stores correct values to TXDATA register, and TXCNT field of TESTREG matches the number of words stored in tx fifo. But MISO line remains low when first word is being transmitted.

Looks like this is hardware problem. Is it possible to workaround it somehow?

Thanks a lot

ラベル(1)
タグ(2)
0 件の賞賛
1 解決策
1,265件の閲覧回数
andrewyerokhin
Contributor II

Hello,

Thanks for your reply. Problem is solved now, this was mostly my mistake.

The reason was that iMX SPI transmitter requires chipselect edges to be generated by spi master, even when SS_CTL=0. That wasn't clear to me after reading IMX6DQRM.

After I configured spi master to change SS level between transfers, all transmission problems gone away:)

Talking about "polarity changes" on the miso line, well, probably that was a garbage from TxFIFO sent by spi transmitter...

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
1,265件の閲覧回数
alejandrolozan1
NXP Employee
NXP Employee

Hi,

PengFushi, Do you have an idea of what could be the problem?

Thanks a lot,

Alejandro

0 件の賞賛
1,266件の閲覧回数
andrewyerokhin
Contributor II

Hello,

Thanks for your reply. Problem is solved now, this was mostly my mistake.

The reason was that iMX SPI transmitter requires chipselect edges to be generated by spi master, even when SS_CTL=0. That wasn't clear to me after reading IMX6DQRM.

After I configured spi master to change SS level between transfers, all transmission problems gone away:)

Talking about "polarity changes" on the miso line, well, probably that was a garbage from TxFIFO sent by spi transmitter...

0 件の賞賛
1,265件の閲覧回数
andrewyerokhin
Contributor II

Some additional details:

1) Spi master device is omap am33, and it operates properly. I checked that, connecting it's mosi and miso to each other.

2) First word disappears only from miso line of IMX, mosi line is good.

3) Polarity of signal on miso line becomes high in inactive state after few transfers. This behaviour should be controlled with DATA_CTL field of CONFIGREG, but looks like it not depends at all on value of that field... So first word of each message from IMX is read as 0x00000000, but after few transfers it becomes 0xffffffff.

Did someone faced such problem with spi on imx6q?

Or did someone succeeded to enable spi slave mode on imx6q?:)

Thanks

0 件の賞賛