<?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 Re: MCXA153: LPSPI data burst transfer. in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXA153-LPSPI-data-burst-transfer/m-p/2388714#M5594</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/20898"&gt;@bogdan_u&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, there are currently no relevant examples available.&lt;/P&gt;
&lt;P&gt;The closest MCXA153 example I found uses LPSPI_MasterTransferEDMALite() with eDMA, but the driver targets TDR/RDR via LPSPI_GetTxRegisterAddress() / LPSPI_GetRxRegisterAddress() , not the burst alias window.&lt;/P&gt;
&lt;P&gt;But i think you can try to use.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;typedef struct
{
    uint32_t cmd;          
    uint32_t data[128];    
} lpspi_burst_tx_t;&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;static inline uint32_t LPSPI_TCBR_Address(LPSPI_Type *base)
{
    return ((uint32_t)base + LPSPI_TCBR_OFFSET);
}

static inline uint32_t LPSPI_TDBR0_Address(LPSPI_Type *base)
{
    return ((uint32_t)base + LPSPI_TDBR0_OFFSET);
}

static inline uint32_t LPSPI_RDBR0_Address(LPSPI_Type *base)
{
    return ((uint32_t)base + LPSPI_RDBR0_OFFSET);
}

void LPSPI_StartTxBurstDMA(LPSPI_Type *base,
                           edma_handle_t *txDmaHandle,
                           uint32_t *cmd_plus_data,
                           uint32_t nwords)
{
    edma_transfer_config_t cfg = {0};

    cfg.srcAddr           = (uint32_t)&amp;amp;cmd_plus_data[0];
    cfg.destAddr          = LPSPI_TCBR_Address(base);
    cfg.srcOffset         = 4;
    cfg.destOffset        = 4;
    cfg.srcTransferSize   = kEDMA_TransferSize4Bytes;
    cfg.destTransferSize  = kEDMA_TransferSize4Bytes;
    cfg.minorLoopBytes    = 4;
    cfg.majorLoopCounts   = nwords + 1u;

    EDMA_ResetChannel(txDmaHandle-&amp;gt;base, txDmaHandle-&amp;gt;channel);
    EDMA_SetTransferConfig(txDmaHandle-&amp;gt;base, txDmaHandle-&amp;gt;channel, &amp;amp;cfg, NULL);

    EDMA_StartTransfer(txDmaHandle);
    LPSPI_EnableDMA(base, kLPSPI_TxDmaEnable);
}


void LPSPI_StartRxBurstDMA(LPSPI_Type *base,
                           edma_handle_t *rxDmaHandle,
                           uint32_t *rx_words,
                           uint32_t nwords)
{
    edma_transfer_config_t cfg = {0};

    cfg.srcAddr           = LPSPI_RDBR0_Address(base);
    cfg.destAddr          = (uint32_t)&amp;amp;rx_words[0];
    cfg.srcOffset         = 4;
    cfg.destOffset        = 4;
    cfg.srcTransferSize   = kEDMA_TransferSize4Bytes;
    cfg.destTransferSize  = kEDMA_TransferSize4Bytes;
    cfg.minorLoopBytes    = 4;
    cfg.majorLoopCounts   = nwords;

    EDMA_ResetChannel(rxDmaHandle-&amp;gt;base, rxDmaHandle-&amp;gt;channel);
    EDMA_SetTransferConfig(rxDmaHandle-&amp;gt;base, rxDmaHandle-&amp;gt;channel, &amp;amp;cfg, NULL);

    EDMA_StartTransfer(rxDmaHandle);
    LPSPI_EnableDMA(base, kLPSPI_RxDmaEnable);
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2026 03:04:58 GMT</pubDate>
    <dc:creator>Harry_Zhang</dc:creator>
    <dc:date>2026-07-01T03:04:58Z</dc:date>
    <item>
      <title>MCXA153: LPSPI data burst transfer.</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXA153-LPSPI-data-burst-transfer/m-p/2387348#M5579</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The Reference Manual MCXA153 contains a description of the TDBRn and RDBRn LPSPI registers:&lt;BR /&gt;"TDBRn and RDBRn registers supports burst transfers of data to the transmit FIFO for use with the DMA controller".&lt;BR /&gt;Can anyone share sample code for a burst transfer using these registers?&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Bogdan&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jun 2026 11:44:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXA153-LPSPI-data-burst-transfer/m-p/2387348#M5579</guid>
      <dc:creator>bogdan_u</dc:creator>
      <dc:date>2026-06-27T11:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: MCXA153: LPSPI data burst transfer.</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXA153-LPSPI-data-burst-transfer/m-p/2388714#M5594</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/20898"&gt;@bogdan_u&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, there are currently no relevant examples available.&lt;/P&gt;
&lt;P&gt;The closest MCXA153 example I found uses LPSPI_MasterTransferEDMALite() with eDMA, but the driver targets TDR/RDR via LPSPI_GetTxRegisterAddress() / LPSPI_GetRxRegisterAddress() , not the burst alias window.&lt;/P&gt;
&lt;P&gt;But i think you can try to use.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;typedef struct
{
    uint32_t cmd;          
    uint32_t data[128];    
} lpspi_burst_tx_t;&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;static inline uint32_t LPSPI_TCBR_Address(LPSPI_Type *base)
{
    return ((uint32_t)base + LPSPI_TCBR_OFFSET);
}

static inline uint32_t LPSPI_TDBR0_Address(LPSPI_Type *base)
{
    return ((uint32_t)base + LPSPI_TDBR0_OFFSET);
}

static inline uint32_t LPSPI_RDBR0_Address(LPSPI_Type *base)
{
    return ((uint32_t)base + LPSPI_RDBR0_OFFSET);
}

void LPSPI_StartTxBurstDMA(LPSPI_Type *base,
                           edma_handle_t *txDmaHandle,
                           uint32_t *cmd_plus_data,
                           uint32_t nwords)
{
    edma_transfer_config_t cfg = {0};

    cfg.srcAddr           = (uint32_t)&amp;amp;cmd_plus_data[0];
    cfg.destAddr          = LPSPI_TCBR_Address(base);
    cfg.srcOffset         = 4;
    cfg.destOffset        = 4;
    cfg.srcTransferSize   = kEDMA_TransferSize4Bytes;
    cfg.destTransferSize  = kEDMA_TransferSize4Bytes;
    cfg.minorLoopBytes    = 4;
    cfg.majorLoopCounts   = nwords + 1u;

    EDMA_ResetChannel(txDmaHandle-&amp;gt;base, txDmaHandle-&amp;gt;channel);
    EDMA_SetTransferConfig(txDmaHandle-&amp;gt;base, txDmaHandle-&amp;gt;channel, &amp;amp;cfg, NULL);

    EDMA_StartTransfer(txDmaHandle);
    LPSPI_EnableDMA(base, kLPSPI_TxDmaEnable);
}


void LPSPI_StartRxBurstDMA(LPSPI_Type *base,
                           edma_handle_t *rxDmaHandle,
                           uint32_t *rx_words,
                           uint32_t nwords)
{
    edma_transfer_config_t cfg = {0};

    cfg.srcAddr           = LPSPI_RDBR0_Address(base);
    cfg.destAddr          = (uint32_t)&amp;amp;rx_words[0];
    cfg.srcOffset         = 4;
    cfg.destOffset        = 4;
    cfg.srcTransferSize   = kEDMA_TransferSize4Bytes;
    cfg.destTransferSize  = kEDMA_TransferSize4Bytes;
    cfg.minorLoopBytes    = 4;
    cfg.majorLoopCounts   = nwords;

    EDMA_ResetChannel(rxDmaHandle-&amp;gt;base, rxDmaHandle-&amp;gt;channel);
    EDMA_SetTransferConfig(rxDmaHandle-&amp;gt;base, rxDmaHandle-&amp;gt;channel, &amp;amp;cfg, NULL);

    EDMA_StartTransfer(rxDmaHandle);
    LPSPI_EnableDMA(base, kLPSPI_RxDmaEnable);
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2026 03:04:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXA153-LPSPI-data-burst-transfer/m-p/2388714#M5594</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2026-07-01T03:04:58Z</dc:date>
    </item>
  </channel>
</rss>

