i.MX RT 1064 Issues with Setting up FlexSPI Driver GUI

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

i.MX RT 1064 Issues with Setting up FlexSPI Driver GUI

214 Views
atak_e
Contributor I

Hello,

I am trying to set up a custom FlexSPI implementation using the built-in driver GUI found in MXUXpresso's Peripherals menu. I will be connecting to a FPGA and wanted to use 4 lane SPI (Quad SPI) to read/write to the slave FPGA. I am using the "Hyper Flash Polling Transfer" example within MCUXpresso to set up the Look Up Tables and the Read/Write functions.

 

I wrote a basic write/read/compare program to write to the FlexSPI pins, read from the pins, and then compare the input value with the output value. I am currently stuck due to getting a "7002" error code (kStatus_FLEXSPI_IpCommandSequenceError) from my write function.

 

To initialize FlexSPI in my program, I am just calling:

BOARD_InitBootPeripherals();

FLEXSPI_Enable(BOARD_FPGA_QSPI_PERIPHERAL, true);

Am I missing any additional functions I need to run before any FlexSPI operations?

 

Here is the Look Up Table (LUT) in peripherals.c: 

atak_e_0-1676993802150.png

Here is the LUT Sequencing found in peripherals.h: 

atak_e_1-1676994020536.png

The command bytes for the LUT (0xA0, 0x18, etc.) are all made up and arbitrary. I am writing the VHDL for the FPGA and can customize the commands for whatever the RT 1064 supports. 

 

Here is the Write Function:

atak_e_3-1676994068179.png

 

My program runs the read/write functions by setting it up as a status call, just like the FlexSPI examples. The status will then return as 7002, which is the error code for an IP Command issue.

atak_e_4-1676994242551.png

 

I am confused on what the issue is. Stepping through the code during debugging lets me see the error getting set, but not what is actually causing the error. Would switching to AHB commands fix this issue? 

 

Any help/clarification would be appreciated, thank you.

 

 

 

Labels (1)
0 Kudos
0 Replies