Hello Mark,
If we look into MQX 4.2.0 Release Notes.pdf, on page 11 it states:
----------------- SPI I/O Driver
This driver supports the operation master mode. If enabled in user configuration, the SPI device drivers are installed during the BSP startup code as “spi0:” (or “spiX:” where X is index of the SPI module used). The SPI driver is significantly rewritten in the MQX 4.0, so that there is no distinct interrupt or polled driver type. See I/O User Guide for details. On Kinetis and Vybrid platforms, the driver uses DMA to function.
------------------
For slave mode, you can use one of:
- ProcessorExpert bases spi driver
- spi_legacy driver (which is the one from MQX 3.8.1). Spi_legacy has slave mode. If you wish to use this one, you have to add the spi_legacy source files to the application or BSP build project.
- write your own driver for spi slave using direct accesses to DSPI module registers and call it from an MQX task.
Regarding DMA:
DMA support in device drivers has been extended
- Introduced new DMA device driver, supporting eDMA peripheral on Kinetis and Vybrid processor families
- The SPI device driver was updated to support the new DMA driver
- The SAI and eSAI audio drivers support DMA
- eSDHC drivers were reworked to fully leverage the ADMA peripheral module
However please check the DSPI issues related to the DMA usage:
When the DSPI uses the eDMA, it may transfer data incorrectly or fail when eDMA is used for another purpose. If the DSPI driver is the only user of eDMA, it should operate correctly. This behavior is a result of the silicon design of the DSPI. DMA usage can be disabled in the DSPI driver by redefining the macro BSPCFG_DSPIx_USE_DMA to 0 in user_config.h.
Please check more information at the next link:
https://community.freescale.com/thread/323538
I hope this helps,
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------