Trying to modify the LUT for the MXRT1050

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to modify the LUT for the MXRT1050

1,130 Views
mike4
Contributor III

We are using the QSPI flash option with the IMXRT1050-EVKB development board.  We are trying to better understand the format of the LUT so we can add some commands.  In the Erase Sector Sequence command line shown at the end we understand the first 5 lines. However, we don't understand the 0x18 value for opcode1?


kFLEXSPI_Command_SDR = 01 (cmd0 value for CMD_SDR)
kFLEXSPI_1PAD = 0 (pad0 set for single pad)
0xD7 = opcode0 (Sector erase command for IS25WP064 QSPI Flash)
kFLEXSPI_Command_RADDR_SDR = 02 (cmd1 value for RADDR_SDR)
kFLEXSPI_1PAD = 0 (pad1 set for single pad)
0x18 = What does this opcode1 value represent? Can't find it in the QSPI flash Data sheet?

 /* Erase Sector  */
   [4 * NOR_CMD_LUT_SEQ_IDX_ERASESECTOR] =
     FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0xD7, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD,0x18),

0 Kudos
16 Replies

978 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi michael bleecker,

Thank you for your interest in NXP Semiconductor products and
the opportunity to serve you.
The external QSPI usually can support supports 3-byte(default) or 4-byte addressing. 0x18 is 24 in decimal and it means to select the 3-byte addressing.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

926 Views
EdSutter
Senior Contributor II

Is this documented anywhere?  

0 Kudos

918 Views
Masmiseim
Senior Contributor I

Hello EdSutter,

 

check this document:

http://www.issi.com/WW/pdf/25WP064A.pdf

Page 46.

 

regards

0 Kudos

911 Views
EdSutter
Senior Contributor II

Hi Masmiseim,

Thanks for replying, but I'm referring to the explanation by @jeremyzhou  regarding the '0x18' (operand to kFLEXSPI_Command_RADDR_SDR opcode in the LUT entry submitted by @mike4 ).   I am trying to get a better understanding of the details of LUT entries especially at boot time.  See this post.

Thanks,

 

 

 

0 Kudos

900 Views
mjbcswitzerland
Specialist V

Hi

Each command has an operand - eg. the SDR command has the command value as operand.
In the case of the RADDR and CADDR commands the operand is the number of address bits.

Unfortunately the documents are written by experts who understand the details for other experts who already understand the details too (and therefore don't really need to read them) - so they are not easy to interpret.

In have found it good to use the QSPI flash controller description (as used on some Kinetis parts) alongside the FlexSPI description since they are much the same thing but written in two very different styles.

If you want to know where to find this details it is in fact in this paragraph of the i.MX RT user's manual:

mjbcswitzerland_0-1608756839897.png

It is hardly understandable though if you don't already understand how the instruction is working..

Look at examples and read between lines - here is another hint from other parts of the document:

mjbcswitzerland_1-1608757047715.png

and taking these together and maybe some other help like LSD or other mind-altering chemicals such things will start to fall into place.
In the uTasker project there is a FlexSPI emulator which interprets all instructions that go through the controller and the LUT table entries involved so that the internal operation can be followed. Without this I would also be quite lost....

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1050.html

 

0 Kudos

886 Views
EdSutter
Senior Contributor II

Hi Mark,

Yea I've read through 27.5.8 "Programmable Sequence Engine" enough to feel like I've already taken the mind-altering drugs... I get the format in general.  Its essentially assembly code; but without a decent description of what each opcode does and what the operands are for its tough to digest.  Plus I don't have a feel for how this is actually "executed" so I'm still struggling.

All I wanna do is boot a board that currently runs with a IS25LP064; but now with an IS25LP01G.  As best I can tell they are essentially identical (certainly compatible); so I foolishly assumed I could boot with the same configuration.  Two days later, I stand corrected. 

Anyway, I will take a shot at the QSPI flash controller text to see if that enlightens me...

Thanks,

0 Kudos

902 Views
Masmiseim
Senior Contributor I

Hello EdSutter,

as jeremyzhou already explained, the 0x18 are the number of bits for addressing the sector you like to delete. In your case 0x18 bits --> 24 bits --> 3 byte

compare Figure 8.14Sector Erase Sequence in SPI mode in the document I’ve linked

regards

0 Kudos

895 Views
EdSutter
Senior Contributor II

I understand his response.

I am using a device that has 128MByte, so it needs 28 address bits.  I've seen other posts that seem to indicate that 0x20 (rather than 0x1c) should be used for that; hence, I'd like to see more complete documentation on the LUT instruction format.  I'm just looking for general documentation that explains (in a bit more detail than the Reference manual) each of the LUT Opcodes and their Operands...

0 Kudos

891 Views
Masmiseim
Senior Contributor I

Hello EdSutter,

 

With 24bits you can address up to 16 Megabytes. Sadly, there is no standard how bigger flashes are addressed.

The very first 32 Megabyte Flashes had two chip-select lines. Newer ones have either defined new opcodes for commands with 4 byte addressing which can be used in parallel with 3 byte addressing. Some others use the same opcodes and you can switch the addressing via a configuration flag. You have to check the Datasheet of your flash, not only the iMX Reference manual.

regards

0 Kudos

883 Views
EdSutter
Senior Contributor II

@Masmiseim , as best I can tell, this larger device (see my response to Mark earlier) is essentially the same device but bigger.  I was hoping that the RADDR_SDR operand and .sflashA1Size would be all I would have to change in the evkmimxrt1060_flexspi_nor_config.c; but that hasn't worked...

When I get this fixed I will certainly post an update.  

Thanks for the responses.

Ed

0 Kudos

880 Views
Masmiseim
Senior Contributor I

Hello EdSutter,

 

after a quick check of the Datasheet (http://www.issi.com/WW/pdf/IS25LP(WP)01G.pdf) you shouldn’t have to change anything, as long as you use only the first 16 megabytes.

Compare ‘Table 8.3 Instruction Set with 3-byte or 4-byte address according to EXTADD Bit setting’. The offsets are the same and the addressing is depended on the EXTADD bit. Default is 24 bit addressing.

If you like to use the full size you can either alter the EXTADD bit and use the read opcode 0x3 with 32 bits, or you use the new introduced 4-byte read (opcode 0x13). Compare ‘Table 8.2 New Instruction Set with4-byte address’

 

Regards

 

0 Kudos

873 Views
EdSutter
Senior Contributor II

Yep, that's what I thought before I started down this LUT rabbit hole!

I'll kick myself if this turns out to be a soldering issue on the board.

Will post results (even if they are embarrassing) when resolved.

Merry Christmas

0 Kudos

862 Views
mjbcswitzerland
Specialist V

Hi

I would go for a HW problem since I see no reason why the part shouldn't boot normally.
However, how are you programming code to it to boot from??

Regards

Mark

 

0 Kudos

847 Views
EdSutter
Senior Contributor II

Just using jlink for first time boot...

0 Kudos

811 Views
Masmiseim
Senior Contributor I

Hello EdSutter,

 

writing and verifying your Application via JLink is working without a problem? Then you shouldn’t have a soldering problem.

However, you could check the command sequence on startup with a logic-analyzer

Regards

 

0 Kudos

770 Views
EdSutter
Senior Contributor II

Sorry for delay, been out for Christmas...

Yea, I'm not sure where to go with this.  I agree JLINK working certainly implies that the device is soldered down correctly and while I don't have a logic analyzer in hand (working from home); I can say that at boot time the CE pin of the IS25LP01 does toggle a bit.  I'll have to step back and make sure I have the boot strapping 100% correct...

Meanwhile, I guess I'll also dig a bit more into trying to understand how FlexSPI works with the LUT.  Gotta find some of the older quad-spi datasheets (as Mark suggested) that may give me some clues.  As best I can tell the current documentation is only useful if you're basically using code that's already in the SDK. 

Thanks

0 Kudos