Panel For Example Panel For Example Panel For Example
FlexSPI LUT Length on i.MX RT Series

FlexSPI LUT Length on i.MX RT Series

Author : Adrian September 03, 2025

An issue was first reported by a customer using the RT600. They noticed in the user manual that the FlexSPI peripheral's Look-Up Table (LUT) length was specified as 128 words, double the size found on the RT500/RT10xx/RT1170 series. However, when they tried to use the upper 64 words, they found they were not functional.

The FlexSPI peripheral's 64-word LUT, which supports up to 16 sequences, is generally sufficient for most applications. After testing on an RT600 development board, it was confirmed that this is an error in the RT600 user manual. This article clarifies the LUT length and design across the entire i.MX RT series.

Note: This error is found in the RT600 UM (Rev 1.8 and earlier) and the SDK (v25.06 and earlier).

 

LUT Design Differences

The Look-Up Table (LUT) is a core component of the FlexSPI peripheral. The error discovered in the RT600 manual and SDK was in the FlexSPI structure definition, where the LUT constant `FLEXSPI_LUT_COUNT` was incorrectly set to 128 instead of the actual value of 64. Header files are typically auto-generated based on the manual's content.

Besides total length, another key LUT metric is the maximum length of a single sequence (the number of instructions). On most i.MX RT devices, a single FlexSPI sequence supports a maximum of 8 instructions, with each instruction being 2 bytes long.

Note: When a sequence uses fewer than 8 instructions, the remaining space cannot be used for other purposes. This is because the sequence index specified in `FlexSPI->IPCR1[ISEQID]` corresponds to a step size in the LUT equal to the maximum sequence length.

The peripheral on the RT700 has been upgraded to XSPI, which supports up to 10 instructions per sequence. Other aspects of its LUT usage are similar to FlexSPI.

The RT1180 currently offers the highest number of supported sequences. For other i.MX RT devices, if an application requires more than 16 sequences, the LUT can be dynamically updated to time-share the space, effectively allowing for an unlimited number of sequences.

 

Impact of LUT Length on Drivers

The current SDK's FlexSPI driver and examples are designed for 16 sequences, which is suitable for all i.MX RT models except the RT1180. For the RT1180, `CUSTOM_LUT_LENGTH` can be changed to 128 in the example code, and more sequences can be added to `customLUT`.

#define CUSTOM_LUT_LENGTH 128 const uint32_t customLUT[CUSTOM_LUT_LENGTH] = { // Sequences... };

In the `fsl_flexspi.c` driver (v2.7.0 and earlier), the `FLEXSPI_UpdateLUT()` function is used to update the LUT. In the provided examples, the entire table is updated at once, so the `index` parameter check works correctly. However, if sequences are updated individually and dynamically, the `assert()` check at the beginning of the function would need to be modified for the RT1180.