MCF537x: continuous transmit with QSPI?

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

MCF537x: continuous transmit with QSPI?

1,471 Views
w_wegner
Contributor III
Hi,

I am trying to use the QSPI to load an FPGA in an application board, so want to transfer a large amount of data as fast as possible.

My idea was to use QSPI for this, but from reading the manual I am not sure if this is possible at all.

The algorithm I have in mind is:

- set NEWQP to 0, ENDQP to 0xf (full 16 words to transfer)
- fill transmit RAM with the first 16 words
- start transfer in wrap-around mode
- poll for CPTQP changes and, if one word is transferred, write the next word to this free location in transmit RAM
- when the last wrap-around occured, clear wrap-around mode and set ENDQP to the last location to be transferred (if the number of words is not divisible by 16)

But I am not sure if writing ENDQP (in the same register as NEWQP) will modify the internal pointer? And, I am a bit puzzled by "Adequate delay between transfers must be specified for long data streams because the QSPI module requires time to load a transmit RAM entry for transfer." in the Section 28.4.3, "Transfer Delays" - does that mean the Standard delay of 17/(fsys/3) is not sufficient? Furthermore, the Note in the table entry for the CONT bit in QCR[0-15] "In order to keep the chip selects asserted for transfers beyond 16 words, ..." is not clear to me - I can only set one inactive level, which does not help me to set the state of 4 CS bits...

In case this has already been answered somewhere, please point me to this - I could not find it in the search.
Help would be really appreciated because unfortunately, I have no real test points where I could measure the signals to see what happens in this design.

Thank you,
Wolfgang
Labels (1)
0 Kudos
1 Reply

203 Views
admin
Specialist II
By your way with wraparound, you cal poll QWR[CPTQP]:
  - Wait until the QWR[CPTQP] field is changed;
  - Set QAR to address of above completed transmit word;
  - Write QDR with the next 16-bit transmit word;
  - Repeat  above operations until end of file.
 
For my oppinion, your algorithm is problematic - without notable communication speed improvement.
Let use standard way without wraparound (derived from NetBurner code and debugged with mcf5270):
  - Fill next 16 transmit words;
  - Enable the QSPI communication;
  - Wait for finish: either poll QIR[SPIF] or concerned interrupt;
  - Repeat above operations until end of file.
 
Tune the baudrate, 'Delay after transfer', 'CS to SCLK', and other parameters according to your FPGA chip datasheet.
 
 
0 Kudos