Hello everybody,
I want to use the LPSPI of a RT1064 with a SCLK of 20+ MHz to transfer data to and from an FPGA. To achieve even higher bandwidth, I want to be able to use the LPSPI in QUAD Mode like QSPI.
The RT1064 would act as (Q)SPI master and the FPGA would be the (Q)SPI slave and act as bus master for a proprietary local bus inside the FPGA.
Every transaction would start in SINGLE-BIT-MODE to transfer a control word containing an opcode and an address. The opcode would control the function of the FPGA interface like 1Bit FDX Read/write or 4Bit HDX Read/Write and so on (likewise the QSPI for standard NOR FLASH does too). The PCS must be kept active throughout the complete transaction.
Single-Bit FDX Read/Write operations already work pretty good and I can use the standard API function of the MCUXpresso SDK but I have a lack of understanding how the transactions can be done when I want to use the 4Bit-mode.
In this case, the oparation mode of the LPSPI has to be changed after transferring the first control word from 1Bit FDX to 4Bit HDX Mode (writing to CFGR1 and TCR, changing from FDX to HDX transmit or receive) whilst the PCS must kept active.
Here are my questions:
- Is there a more detailed documentation of the software programming model of the LPSPI?
- Is it possible to use the standard API funtions of the MCUXpresso SDK to solve the problem?
- It is mentioned in the documentation, that it is possible to use LPSPI to connect to standard NOR FLASH but I didn't find any example for that. Is it ment to use QSPI-Mode for the FLASH and are there any examples for this use-case? (I think this could be helpful as QSPI NOR FLASH uses a similar transaction protocol)
- Are there any example for the usage of LPSPI in QUAD Mode?
Hoping that somone can help me I am looking forward for your replies,
Marco Schulz.