Please tell me about iMX7 Quad SPI

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

Please tell me about iMX7 Quad SPI

1,098 Views
masaru_kamimura
Contributor I

Hello  iMX engineer.

I am trying to read/write serial flash using QuadSPI of iMX7.

The serial flash is ISSI IS25WP512M.

Please tell me about QSPI of iMX7.

1. When reading the status register, the value of QuadSPI1_LUTKEY changes. Please tell me why it will change.

For example:

QuadSPI1_LUT12 = 1c010405

QuadSPI1_LUTKEY = 5AF05AF0
QuadSPI1_LCKCR = 00000001

QuadSPI1_MCR = 000F4C0C
QuadSPI1_SPTRCLR = 00000101

QuadSPI1_IPCR <- 03000001  WRITE
:
QuadSPI1_LUTKEY  5AF05AF0 changes to 5AF05AF3. 

Why? Is something missing?

2.When writing a value with Page Program, 0 is written in the first 16 bytes.
   Please tell me why 0 is written.

For example:

Serial flash address   60000000 -  ALL "FF" DATA

QuadSPI1_LUT16 = 08180402
QuadSPI1_LUT17 = 00002004

QuadSPI1_MCR = 000F4C0C
QuadSPI1_SPTRCLR = 00000101

QuadSPI1_TBDR <- 32 Times write

128Byte Write
00010203
04050607
08090a0b
0c0d0e0f

00000011
00220033
00440055
00660077

00880099
00aa00bb
00cc00dd
00ee00ff

00000000
00001111
00002222
00003333

00004444

00005555
00006666
00007777

00008888

00009999
0000aaaa
0000bbbb

0000cccc

0000dddd
0000eeee
0000ffff

00111111

00555555
00aaaaaa
00ffffff

QuadSPI1_IPCR <- 04000028 (40Byte write)

Serial flash address  60000000 - 6000000F  ALL 00 DATA

Serial flash address  60000010 - 6000001F

DATA

00000011
00220033
00440055
00660077

Why is 0 written to 16 bytes first?

Please give me some advice.

Labels (1)
0 Kudos
2 Replies

1,006 Views
masaru_kamimura
Contributor I

Hi igor

Your comments helped me.
I was able to solve it using the driver sample.

Thank you very much!

Best regards

Masaru Kamimura

0 Kudos

1,007 Views
igorpadykov
NXP Employee
NXP Employee

Hi Masaru

every qspi flash requires own LUT table, details can be found in

sect.10.2.5.3.4 Look-up Table i.MX 7Dual Applications Processor Reference Manual

or

How to write a LUT program sequence for a new QSPI NOR Flash? 

For ISSI IS25WP512M usage one can look at uboot driver (there is "is25wp128" in spi-nor-ids.c):

fsl_qspi.c\spi\drivers - uboot-imx - i.MX U-Boot 

spi-nor-ids.c\spi\mtd\drivers - uboot-imx - i.MX U-Boot 

QSPI NOR Flash - phyCORE-i.MX7 (PCM-061) 

Flashing the NOR from an SD Card - phyCORE-i.MX7 Linux BSP 

i.MX7Dual - SEGGER Wiki 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------