Usage of FlexSPI LUT in i.MXRT

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

Usage of FlexSPI LUT in i.MXRT

2,172 Views
brain00
Contributor II

MXRT1050 FlexSPI module have LUT which support up to 16 sequences which is equivalent to 16 Flash commands.

Many NOR Flash chips today support much more than 16 commands.

1. Is there a way to support NOR Flash devices with more than 16 flash commands ?

2. Is there a way to work with FlexSPI module without the LUT ?

Tags (2)
0 Kudos
6 Replies

1,837 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @brain00 

     Yes, the LUT just can support up to 16 sequences, the LUT table have the size limit.

     So, from my own viewpoint, I think if you think 16 sequences is not enough, after you finish the 16 sequences code, you can configure the LUT table again, just add the other command sequence, then update the LUT table and run the code.

    I think the FlexSPI module need to use the LUT table to work, but more details, I will help you to check it with according department, then give you feedback.

   Please waiting patiently.

 

Wish it helps you!

If you still have question about it, please kindly let me know.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

1,837 Views
brain00
Contributor II

Thank you Kerry for the quick reply

.

if you already going to ask the R&D guys about this,

Can you please also add client request for the next chips to have more than 16 sequences ?  (i.e: 32)

Waiting for your reply

0 Kudos

1,837 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @brain00 

     You can use the method which I recommend you in the above reply.

     About your request, I will record it, but I don't make sure it can be accepted by the according department.

     Thanks a lot for your understanding.


Have a great day,
Kerry

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

1,740 Views
kamal1
Contributor III

Hello, 

I am having the same issue regarding the 16 sequence max limit. I need more than 16 sequences. I have tried to create a second LUT table to use after the Flexspi configuration, but when I try to update the LUT using FLEXSPI_UpdateLUT, it does not appear to work.

 

What are the complete steps for updating the LUT with different sequences? Do I need to reinitialize the Flexspi?

@kerryzhou 

0 Kudos

1,735 Views
mjbcswitzerland
Specialist V

Hi

Here's the LUT reconfiguration from the uTasker project (I think that the NXP SDK has something similar).

The use is fnEnterLUT(pointer to the new look up table, reference to the bus - 0 for FlexSPI1 and 1 or FlexSPI2). It works for QSPI or hyper flash.

 

static void fnEnterLUT(const FLEXSPI_LUT_ENTRY *ptrTable, int iBus)
{
    int iLUT = 0;
    volatile unsigned long *ptrLUT;
    iMX_FLEX_SPI *ptrFlexSPI = (iMX_FLEX_SPI *)FLEX_SPI_BLOCK;
#if FLEX_SPI_INTERFACES > 1
    if (iBus != 0) {
        ptrFlexSPI = (iMX_FLEX_SPI *)FLEX_SPI2_BLOCK;
    }
#endif
    // Update look-up table
    //
    while ((ptrFlexSPI->STS0 & (FLEX_SPI_STS0_ARBIDLE | FLEX_SPI_STS0_SEQIDLE)) != (FLEX_SPI_STS0_ARBIDLE | FLEX_SPI_STS0_SEQIDLE)) {} // wait until the bus is idle

    ptrFlexSPI->LUTKEY = FLEX_SPI_LUTKEY_KEY;
    ptrFlexSPI->LUTCR = FLEX_SPI_LUTCR_UNLOCK;
    uMemset((void *)&ptrFlexSPI->LUT0, 0x00, (FLEX_SPI_LUT_ENTRIES * sizeof(unsigned long))); // ensure all non-used entries are clear
    while (ptrTable[iLUT].ulReference != NOR_CMD_LUT_SEQ_IDX_END_OF_TABLE) {
        ptrLUT = &ptrFlexSPI->LUT0;
        ptrLUT += ((ptrTable[iLUT].ulReference & 0x0f) * 4);             // move to the LUT entry
        if (*ptrLUT != 0) {
            _EXCEPTION("Overlapping LUT indexes being used!!!!");
        }
        *ptrLUT++ = ptrTable[iLUT].ulEntrySequence[0];                   // enter the sequence(s)
        *ptrLUT = ptrTable[iLUT].ulEntrySequence[1];
#if defined BOOT_HYPER_FLASH
        *(++ptrLUT) = ptrTable[iLUT].ulEntrySequence[2];
        *(++ptrLUT) = ptrTable[iLUT].ulEntrySequence[3];
#endif
        iLUT++;
    }

    ptrFlexSPI->LUTKEY = FLEX_SPI_LUTKEY_KEY;
    ptrFlexSPI->LUTCR = FLEX_SPI_LUTCR_LOCK;

    ptrFlexSPI->MCR0 |= FLEX_SPI_MCR0_SWRESET;                           // perform a reset of the module
    _WAIT_REGISTER_TRUE(ptrFlexSPI->MCR0, FLEX_SPI_MCR0_SWRESET);        // wait for reset to complete
}

 

 

Note that a SW reset is made to the module before using the new table.

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

0 Kudos

659 Views
ManikantaRobbi
Contributor II

Hi, 

I'm working on Hyper Bus interfaces (Hyper Flash/Hyper Bus).I referred the source code of SDK (RT-1050) along with reference manual. But, I require more information about hyper flash. Especially LUT table. please share any information regarding usage of Hyper Bus devices.

0 Kudos