<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LPSPI3 + eDMA4 Transfer Issue on i.MX93 EVK (M33 Core) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/LPSPI3-eDMA4-Transfer-Issue-on-i-MX93-EVK-M33-Core/m-p/2346223#M244795</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently testing an external ADC (ADS131E08) functionality using the i.MX93 EVK. I have already confirmed that the LPSPI3 interface works fine in Polling/Interrupt mode. Now, I am trying to implement LPSPI3 combined with eDMA4 to optimize performance.&lt;/P&gt;&lt;P&gt;Environment:&lt;/P&gt;&lt;P&gt;Target Board: MCIMX93-EVK (Cortex-M33)&lt;/P&gt;&lt;P&gt;SDK Version: MCUXpresso SDK 25.12.0&lt;/P&gt;&lt;P&gt;IDE: VSCode with MCUXpresso Extension&lt;/P&gt;&lt;P&gt;Since there is no specific "LPSPI-EDMA" example for i.MX93 in the SDK, I implemented the following based on other peripheral examples:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Memory Allocation (OCRAM - NonCacheable)&lt;/P&gt;&lt;P&gt;I placed all DMA-related buffers and handles in the OCRAM section and configured the MPU as Non-Cacheable to avoid coherency issues.&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;/* Linker Script */ MEMORY { m_data (RW) : ORIGIN = 0x20003000, LENGTH = 0x0001B000 m_ocram (RW) : ORIGIN = 0x20480000, LENGTH = 0x00040000 } .noncacheable_section : { . = ALIGN(32); __noncacheable_start__ = .; *(NonCacheable) __noncacheable_end__ = .; } &amp;gt; m_ocram&lt;/P&gt;&lt;P&gt;/* Variable Definitions */ __attribute__((section("NonCacheable"), aligned(32))) static lpspi_master_edma_handle_t g_lpspi_master_edma_handle; AT_NONCACHEABLE_SECTION_INIT(static edma_handle_t g_lpspi_tx_dma_handle); AT_NONCACHEABLE_SECTION_INIT(static edma_handle_t g_lpspi_rx_dma_handle); __attribute__((section("NonCacheable"), aligned(32))) static uint8_t dummy_tx_data[ADC_SAMPLE_BYTES] = { ... }; __attribute__((section("NonCacheable"), aligned(32))) static uint8_t sample_buf_ping[INTERPOLATION_L][ADC_SAMPLE_BYTES];&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Initialization Process&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I configured eDMA4, created handles, and linked them to LPSPI3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;static void LPSPI_Master_DMA_Init(void) { edma_config_t userConfig; EDMA_GetDefaultConfig(&amp;amp;userConfig); EDMA_Init(DMA4, &amp;amp;userConfig); EDMA_CreateHandle(&amp;amp;g_lpspi_tx_dma_handle, DMA4, LPSPI3_TX_DMA_CHANNEL); // CH 12 EDMA_CreateHandle(&amp;amp;g_lpspi_rx_dma_handle, DMA4, LPSPI3_RX_DMA_CHANNEL); // CH 13 EDMA_SetChannelMux(DMA4, LPSPI3_TX_DMA_CHANNEL, kDma4RequestMuxLPSPI3Tx); EDMA_SetChannelMux(DMA4, LPSPI3_RX_DMA_CHANNEL, kDma4RequestMuxLPSPI3Rx); LPSPI_MasterTransferCreateHandleEDMA( LPSPI3, &amp;amp;g_lpspi_master_edma_handle, LPSPI_MasterUserCallback, NULL, &amp;amp;g_lpspi_rx_dma_handle, &amp;amp;g_lpspi_tx_dma_handle); }&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. SPI Transaction with Address Conversion&lt;/P&gt;&lt;P&gt;I used MEMORY_ConvertMemoryMapAddress to provide the System Address (Local2DMA) to the eDMA engine.&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;xfer.txData = (uint8_t *)MEMORY_ConvertMemoryMapAddress((uint32_t)dummy_tx_data, kMEMORY_Local2DMA); xfer.rxData = (uint8_t *)MEMORY_ConvertMemoryMapAddress((uint32_t)sample_buf_ping, kMEMORY_Local2DMA); xfer.dataSize = ADC_SAMPLE_BYTES; xfer.configFlags = kLPSPI_MasterPcs0; status_t ret = LPSPI_MasterTransferEDMA(LPSPI3, &amp;amp;g_lpspi_master_edma_handle, &amp;amp;xfer);&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Symptoms:&lt;/P&gt;&lt;P&gt;The first call to LPSPI_MasterTransferEDMA returns kStatus_Success, but no SPI clock or data is observed on the oscilloscope.&lt;/P&gt;&lt;P&gt;From the second call onwards, it consistently returns kStatus_LPSPI_Busy. This suggests that the driver's internal state is stuck in 'Busy' because the first transfer never completed or triggered the 'Transfer Done' interrupt.&lt;/P&gt;&lt;P&gt;Checking the eDMA4 registers:&lt;/P&gt;&lt;P&gt;TCD[12].CH_CSR (ERQ bit) is 0 (or not being set properly).&lt;/P&gt;&lt;P&gt;CH_ES (Error Status) sometimes shows DBE (Destination Bus Error).&lt;/P&gt;&lt;P&gt;The LPSPI3 DER register has TDDE and RDDE bits set to 1 after the first call, meaning the SPI peripheral is requesting DMA, but the eDMA engine is not responding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Apr 2026 10:20:11 GMT</pubDate>
    <dc:creator>KyeJeong</dc:creator>
    <dc:date>2026-04-07T10:20:11Z</dc:date>
    <item>
      <title>LPSPI3 + eDMA4 Transfer Issue on i.MX93 EVK (M33 Core)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/LPSPI3-eDMA4-Transfer-Issue-on-i-MX93-EVK-M33-Core/m-p/2346223#M244795</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently testing an external ADC (ADS131E08) functionality using the i.MX93 EVK. I have already confirmed that the LPSPI3 interface works fine in Polling/Interrupt mode. Now, I am trying to implement LPSPI3 combined with eDMA4 to optimize performance.&lt;/P&gt;&lt;P&gt;Environment:&lt;/P&gt;&lt;P&gt;Target Board: MCIMX93-EVK (Cortex-M33)&lt;/P&gt;&lt;P&gt;SDK Version: MCUXpresso SDK 25.12.0&lt;/P&gt;&lt;P&gt;IDE: VSCode with MCUXpresso Extension&lt;/P&gt;&lt;P&gt;Since there is no specific "LPSPI-EDMA" example for i.MX93 in the SDK, I implemented the following based on other peripheral examples:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Memory Allocation (OCRAM - NonCacheable)&lt;/P&gt;&lt;P&gt;I placed all DMA-related buffers and handles in the OCRAM section and configured the MPU as Non-Cacheable to avoid coherency issues.&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;/* Linker Script */ MEMORY { m_data (RW) : ORIGIN = 0x20003000, LENGTH = 0x0001B000 m_ocram (RW) : ORIGIN = 0x20480000, LENGTH = 0x00040000 } .noncacheable_section : { . = ALIGN(32); __noncacheable_start__ = .; *(NonCacheable) __noncacheable_end__ = .; } &amp;gt; m_ocram&lt;/P&gt;&lt;P&gt;/* Variable Definitions */ __attribute__((section("NonCacheable"), aligned(32))) static lpspi_master_edma_handle_t g_lpspi_master_edma_handle; AT_NONCACHEABLE_SECTION_INIT(static edma_handle_t g_lpspi_tx_dma_handle); AT_NONCACHEABLE_SECTION_INIT(static edma_handle_t g_lpspi_rx_dma_handle); __attribute__((section("NonCacheable"), aligned(32))) static uint8_t dummy_tx_data[ADC_SAMPLE_BYTES] = { ... }; __attribute__((section("NonCacheable"), aligned(32))) static uint8_t sample_buf_ping[INTERPOLATION_L][ADC_SAMPLE_BYTES];&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Initialization Process&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I configured eDMA4, created handles, and linked them to LPSPI3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;static void LPSPI_Master_DMA_Init(void) { edma_config_t userConfig; EDMA_GetDefaultConfig(&amp;amp;userConfig); EDMA_Init(DMA4, &amp;amp;userConfig); EDMA_CreateHandle(&amp;amp;g_lpspi_tx_dma_handle, DMA4, LPSPI3_TX_DMA_CHANNEL); // CH 12 EDMA_CreateHandle(&amp;amp;g_lpspi_rx_dma_handle, DMA4, LPSPI3_RX_DMA_CHANNEL); // CH 13 EDMA_SetChannelMux(DMA4, LPSPI3_TX_DMA_CHANNEL, kDma4RequestMuxLPSPI3Tx); EDMA_SetChannelMux(DMA4, LPSPI3_RX_DMA_CHANNEL, kDma4RequestMuxLPSPI3Rx); LPSPI_MasterTransferCreateHandleEDMA( LPSPI3, &amp;amp;g_lpspi_master_edma_handle, LPSPI_MasterUserCallback, NULL, &amp;amp;g_lpspi_rx_dma_handle, &amp;amp;g_lpspi_tx_dma_handle); }&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. SPI Transaction with Address Conversion&lt;/P&gt;&lt;P&gt;I used MEMORY_ConvertMemoryMapAddress to provide the System Address (Local2DMA) to the eDMA engine.&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;xfer.txData = (uint8_t *)MEMORY_ConvertMemoryMapAddress((uint32_t)dummy_tx_data, kMEMORY_Local2DMA); xfer.rxData = (uint8_t *)MEMORY_ConvertMemoryMapAddress((uint32_t)sample_buf_ping, kMEMORY_Local2DMA); xfer.dataSize = ADC_SAMPLE_BYTES; xfer.configFlags = kLPSPI_MasterPcs0; status_t ret = LPSPI_MasterTransferEDMA(LPSPI3, &amp;amp;g_lpspi_master_edma_handle, &amp;amp;xfer);&lt;/P&gt;&lt;P&gt;============================ code ===============================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Symptoms:&lt;/P&gt;&lt;P&gt;The first call to LPSPI_MasterTransferEDMA returns kStatus_Success, but no SPI clock or data is observed on the oscilloscope.&lt;/P&gt;&lt;P&gt;From the second call onwards, it consistently returns kStatus_LPSPI_Busy. This suggests that the driver's internal state is stuck in 'Busy' because the first transfer never completed or triggered the 'Transfer Done' interrupt.&lt;/P&gt;&lt;P&gt;Checking the eDMA4 registers:&lt;/P&gt;&lt;P&gt;TCD[12].CH_CSR (ERQ bit) is 0 (or not being set properly).&lt;/P&gt;&lt;P&gt;CH_ES (Error Status) sometimes shows DBE (Destination Bus Error).&lt;/P&gt;&lt;P&gt;The LPSPI3 DER register has TDDE and RDDE bits set to 1 after the first call, meaning the SPI peripheral is requesting DMA, but the eDMA engine is not responding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 10:20:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/LPSPI3-eDMA4-Transfer-Issue-on-i-MX93-EVK-M33-Core/m-p/2346223#M244795</guid>
      <dc:creator>KyeJeong</dc:creator>
      <dc:date>2026-04-07T10:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI3 + eDMA4 Transfer Issue on i.MX93 EVK (M33 Core)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/LPSPI3-eDMA4-Transfer-Issue-on-i-MX93-EVK-M33-Core/m-p/2346505#M244800</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your interest in NXP Semiconductor products,&lt;/P&gt;
&lt;P&gt;You can confirm that you have adjusted the resource assignment, clocks and eDMA config with the following Cortex-M SDK test.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Test-LPUART2-DSP-domain-EDMA-on-i-MX8ULP-M33/ta-p/2084403" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Test-LPUART2-DSP-domain-EDMA-on-i-MX8ULP-M33/ta-p/2084403&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 17:38:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/LPSPI3-eDMA4-Transfer-Issue-on-i-MX93-EVK-M33-Core/m-p/2346505#M244800</guid>
      <dc:creator>JosephAtNXP</dc:creator>
      <dc:date>2026-04-07T17:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI3 + eDMA4 Transfer Issue on i.MX93 EVK (M33 Core)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/LPSPI3-eDMA4-Transfer-Issue-on-i-MX93-EVK-M33-Core/m-p/2346633#M244807</link>
      <description>Thank you for your quick response.&lt;BR /&gt;&lt;BR /&gt;As you suggested, I attempted to configure the TRDC to enable DMA access. However, since my M33 firmware is running in Non-Secure mode, any attempt to access or modify the TRDC registers results in a HardFault (Bus Error).&lt;BR /&gt;&lt;BR /&gt;Based on this, I have a follow-up question:&lt;BR /&gt;Is it mandatory to complete the TRDC peripheral/memory access configurations within the A55 U-Boot (or ATF/SPL) phase before launching the M33 core?&lt;BR /&gt;&lt;BR /&gt;Since the TRDC seems to be locked or restricted for Non-Secure M33 masters, I suspect that the configuration for LPSPI3 and eDMA4 must be pre-defined in the bootloader's TRDC initialization table. Could you confirm if this is the correct architectural approach for i.MX93?</description>
      <pubDate>Wed, 08 Apr 2026 02:00:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/LPSPI3-eDMA4-Transfer-Issue-on-i-MX93-EVK-M33-Core/m-p/2346633#M244807</guid>
      <dc:creator>KyeJeong</dc:creator>
      <dc:date>2026-04-08T02:00:07Z</dc:date>
    </item>
  </channel>
</rss>

