I want to configure S32K144 DMA to communicate with an external SPI FRAM/FLASH chip, but I am not able to find any example with processor expert how to configure DMA and LPSPI for this application and how to access FRAM read and write. Kindly give some example project or correct method to do this using PE.
Hi @Selva24,
You can use the included example from the RTM v3.0.0:
There is also this non-SDK example, which uses the PIT module, and every trigger starts a minor DMA loop (8 bytes) transfer to the LPSPI1 TX FIFO: Example S32K144 LPIT DMA LPSPI - NXP Community.
Best regards,
Julián
I have used lpspi_dma_s32k144 example and able to send receive data with this. But I am confused if this is proper method of using DMA for data transfer with an external FRAM/FLASH device. I was assuming we have to use:
EDMA_DRV_ConfigSingleBlockTransfer();
EDMA_DRV_ConfigLoopTransfer();
EDMA_DRV_ConfigScatterGatherTransfer();
EDMA_DRV_ConfigMultiBlockTransfer();
one of these functions to do data transfer. Am I wrong? When will this function be used can someone clarify?
What I want to do is I have to store a data log from processor to external FRAM device at periodic intervals and after some particular time or memory fill, I want to transfer FRAM data into external Flash. My FRAM and FLASH will be on same SPI lines with different CS. In this case DMA should take the load off processor and do all this automatically without or with minimum main processor intervention. So which method will be proper way? Is lpspi_dma_s32k144 example correct method or I have to use one of above function or any other function of EDMA driver. I believe EDMA driver should be configured for this, but I am not able to get the correct way to do it. Also, I would prefer to use SDK or processor expert functions to do it. Can you guide me in the right way to achieve this.