IMXRT1021DAG5A FLEXSPI WRITE_SDR problem

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

IMXRT1021DAG5A FLEXSPI WRITE_SDR problem

357 Views
krister_berglund
Contributor I

Hi,

I am trying to use the Flexspi bus on a imxrt1021dag5a to write data to a SPI TFT LCD. what i would like to do is to create a generic LUT-sequence that only transmit data without first transmitting a command. My sequece is:

const uint32_t customLUT_debug[CUSTOM_LUT_LENGTH_DEBUG] = {
[0] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_1PAD, 0x1, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0)
};

The problem is that the flexspi hardware outputs one extra clock cycle if i start directly with kFLEXSPI_Command_WRITE_SDR(according to my LUT sequence 0 above). However, if add a kFLEXSPI_Command_SDR first, and then perform a kFLEXSPI_Command_WRITE_SDR in my LUT sequence there is no unwanted extra clock cycle. Is this a known limitation and/or is there some way to solve this?

CORRECTION: It actually seems like the number of clock cycles are correct, but the clock starts one clock cycle before the data and stops one clock cycle too soon. That effectively means that the data is shifted one bit right(Eg if i try to send 0xAA, the bus will send 0x55).

Thanks!

/Krister

0 Kudos
1 Reply

345 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
The FlexSPI is specific to be used to access external flash such as QSPI, Hyperflash, etc. So you'd better go through the datasheet of the TFT LCD to validate its access protocol is compatible with the above flashes.
If not, please use the LPSPI instead of FlexSPI to communicate with the TFT LCD.
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