Teensy 4.1: SPI DMA to/from EXTMEM?

tjaekel

Well-known member
I want to use EXTMEM (QSPI flash) as source and destination for SPI transfer, SPI in DMA mode (using TsyDMASPI).
First trial looked like: it is not possible.

Is it possible to do peripheral DMAs (SPI) to/from EXTMEM?

Assuming it would be possible, it raises some other questions:
  1. Is the EXTMEM DCache active?
    Assuming the DCache (and buffering) is active for external EXTMEM - do I have to use Cache Maintenance functions (Clean and Invalidate)?
  2. What is the config of FlexSPI for QSPI memory?
    EXTMEM with external QSPI chip can be 133 MHz with 4-byte data lane (QSPI).
    Is it running in QSPI mode and with max. possible 133 MHz?
    Worst case: single SPI mode and a lower frequency, e.g. 60 MHz
    WHO CAN CONFIRM the EXTMEM (QSPI) config set?
  3. What is the max. speed possible for SPI DMA?
    The FlexSPI interface, "mapping" the external QSPI RAM as memory, has a lot of overhead (select a page, send address...).
    When a DMA is kicked off for a linear SPI packet but this needs a page change in between on EXTMEM - what is the max. SPI clock possible to use?
    Assume as worst case:
    SPI clock is 60 MHz, EXTMEM QSPI clock is 60 MHz (worst: as single SPI). But a DMA from SPI needs to select the next page in EXTMEM.
    This is done via a new command on QSPI: send address (select another page).
    If my SPI DMA is fast, there can be not enough time to do all this overhead during the period of one SPI byte transfer.
    If the SPI device does not have a FIFO, a single byte DMA from SPI to EXTMEM can be faster as the "procedure" on QSPI device (esp. on a page change).

    What would be the fastest SPI clock and SPI DMA in relation to the EXTMEM QSPI timing?
    Is there also a "page size limitation", e.g. SPI transfer is 64KByte, but external QSPI is organized as 4K pages?
 
Back
Top