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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

Labels (1)
Tags (1)
0 Kudos
1 Solution
190 Views
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.

View solution in original post

0 Kudos
3 Replies
190 Views
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 Kudos
190 Views
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 Kudos
191 Views
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.

View solution in original post

0 Kudos