Has anyone worked with iMX6 ECSPI connected to SPI-NOR flash?

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

Has anyone worked with iMX6 ECSPI connected to SPI-NOR flash?

ソリューションへジャンプ
3,065件の閲覧回数
EdSutter
Senior Contributor II

I have a SabreSDB board, and I installed an AT25DF321 on U14.  I am able to do *almost* everthing except that after I do a write to the device, the next access is always messed up.  I've verified (with a scope) that the transfer protocol is correct, so I'm kinda at a wall here.  Has anyone done anything with this interface hooked to SPI-NOR flash?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,805件の閲覧回数
AlejandroSierra
NXP Employee
NXP Employee

Each time the SPI driver transfers data the clock of the spi module is enabled. Please take a look to the "drivers/spi/spi_imx.c" source code.

However this clock enablement is NOT done by writing to the EN on ECSPI_CONREG.

元の投稿で解決策を見る

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

Are you sure this spi nor model is supported on the driver?. Check also the timings and configuration for this model.

We have validated M25P32 on our boards

0 件の賞賛
返信
1,805件の閲覧回数
EdSutter
Senior Contributor II

I did manage to get this interface working reliably, so I apologize for not posting an update (actually I thought I did).  :-)

Anyway, I found that if I toggle the EN bit of the ECSPIx_CONREG after the write completes, then things work ok.
Seems to me that I should not have to do that, but in my case its ok to do.   Actually, what I do now is toggle the EN

bit prior to any burst access to the device. Can you tell me if you do that in your code?

0 件の賞賛
返信
1,806件の閲覧回数
AlejandroSierra
NXP Employee
NXP Employee

Each time the SPI driver transfers data the clock of the spi module is enabled. Please take a look to the "drivers/spi/spi_imx.c" source code.

However this clock enablement is NOT done by writing to the EN on ECSPI_CONREG.

0 件の賞賛
返信